changes
This commit is contained in:
parent
ab467ea11e
commit
66d32fe2eb
|
|
@ -1,9 +0,0 @@
|
||||||
BR, , ,BK, ,BR, ,
|
|
||||||
BP,WP,BP, , ,BP,BP,BP
|
|
||||||
, , , ,WP, , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
WP,WP,WP, , ,WP,WP,WP
|
|
||||||
WR,WN,WB,WQ,WK,WB,WN,WR
|
|
||||||
3W
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
BR,BN,BB,BQ,BK,BB,BN,BR
|
|
||||||
,BP,BP,BP,BP,BP,BP,BP
|
|
||||||
, , , , , , ,
|
|
||||||
BP, , ,WP, , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
WP,WP,WP, ,WP,WP,WP,WP
|
|
||||||
WR,WN,WB,WQ,WK,WB,WN,WR
|
|
||||||
4B
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
, ,BB,BQ,BK, , ,BR
|
|
||||||
BP,WP,BP,BP, ,BP,BP,BP
|
|
||||||
, ,BN,BB, ,BP, ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , ,WK, , , ,
|
|
||||||
3W
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,9 +0,0 @@
|
||||||
BR,BN,BB,BQ,BK,BB,BN,BR
|
|
||||||
BP,BP,BP,BP,BP,BP,BP,BP
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
, , , , , , ,
|
|
||||||
WP,WP,WP,WP,WP,WP,WP,WP
|
|
||||||
WR,WN,WB,WQ,WK,WB,WN,WR
|
|
||||||
0W
|
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 954 B |
|
|
@ -16,6 +16,7 @@ public class Main {
|
||||||
|
|
||||||
// launches graphical interface :
|
// launches graphical interface :
|
||||||
MyInterface mjf = new MyInterface();
|
MyInterface mjf = new MyInterface();
|
||||||
|
mjf.introduction();
|
||||||
mjf.setVisible(true);
|
mjf.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ public class Game extends Thread {
|
||||||
private int LINE_NUM = 8;
|
private int LINE_NUM = 8;
|
||||||
private int loopDelay = 250;
|
private int loopDelay = 250;
|
||||||
boolean[] activationAIFlags;
|
boolean[] activationAIFlags;
|
||||||
|
SoundEffect soundEffect = new SoundEffect();
|
||||||
public Game(MyInterface mjfParam) {
|
public Game(MyInterface mjfParam) {
|
||||||
mjf = mjfParam;
|
mjf = mjfParam;
|
||||||
board = new Board(COL_NUM, LINE_NUM);
|
board = new Board(COL_NUM, LINE_NUM);
|
||||||
|
|
@ -120,6 +120,9 @@ public class Game extends Thread {
|
||||||
public void toggleAI(boolean isWhite) {
|
public void toggleAI(boolean isWhite) {
|
||||||
// System.out.println(isWhite);
|
// System.out.println(isWhite);
|
||||||
this.activationAIFlags[isWhite?1:0] = !this.activationAIFlags[isWhite?1:0];
|
this.activationAIFlags[isWhite?1:0] = !this.activationAIFlags[isWhite?1:0];
|
||||||
|
if (this.activationAIFlags[isWhite?1:0]) {
|
||||||
|
soundEffect.aiSound();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTurnNumber(int turnNumber) {
|
public void setTurnNumber(int turnNumber) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ public class SoundEffect {
|
||||||
public void captureSound() {
|
public void captureSound() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File file = new File("capture.wav");
|
File file = new File("sounds/capture.wav");
|
||||||
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
||||||
Clip clip = AudioSystem.getClip();
|
Clip clip = AudioSystem.getClip();
|
||||||
clip.open(audioStream);
|
clip.open(audioStream);
|
||||||
|
|
@ -19,7 +19,7 @@ public class SoundEffect {
|
||||||
public void movingSound() {
|
public void movingSound() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File file = new File("move-self.wav");
|
File file = new File("sounds/move-self.wav");
|
||||||
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
||||||
Clip clip = AudioSystem.getClip();
|
Clip clip = AudioSystem.getClip();
|
||||||
clip.open(audioStream);
|
clip.open(audioStream);
|
||||||
|
|
@ -31,7 +31,7 @@ public class SoundEffect {
|
||||||
public void aiSound() {
|
public void aiSound() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File file = new File("Voicy_R2-D2-7.wav");
|
File file = new File("sounds/Voicy_R2-D2-7.wav");
|
||||||
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
||||||
Clip clip = AudioSystem.getClip();
|
Clip clip = AudioSystem.getClip();
|
||||||
clip.open(audioStream);
|
clip.open(audioStream);
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,6 @@ public class MyInterface extends JFrame {
|
||||||
|
|
||||||
public void clicButtonStart() {
|
public void clicButtonStart() {
|
||||||
this.instantiateSimu();
|
this.instantiateSimu();
|
||||||
int introduction = introduction();
|
|
||||||
int depth = askDifficulty();
|
int depth = askDifficulty();
|
||||||
int time = askTime();
|
int time = askTime();
|
||||||
game.setAutoPlayerDepth(depth);
|
game.setAutoPlayerDepth(depth);
|
||||||
|
|
@ -345,7 +344,7 @@ public class MyInterface extends JFrame {
|
||||||
default: return 600; // 10 min
|
default: return 600; // 10 min
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private int introduction() {
|
public int introduction() {
|
||||||
|
|
||||||
int boardWidth = 600;
|
int boardWidth = 600;
|
||||||
int boardHeight = 600;
|
int boardHeight = 600;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue