-
Notifications
You must be signed in to change notification settings - Fork 2
/
HumanPlayer.java
executable file
·46 lines (39 loc) · 1.55 KB
/
HumanPlayer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
*
* HumanPlayer.java
*
* Created on 28. September 2004, 17:19
*/
import java.awt.Color;
import java.util.logging.Level;
import java.util.logging.Logger;
/** for humanplayer
* @see Chronos for chronical-order-implementation
*
* @author peter
*/
public class HumanPlayer extends Player
{
/** Creates a new instance of HumanPlayer */
public HumanPlayer(Color color, String namePlayer,int no)
{ super(Const.HUMAN_PLAYER,color, namePlayer, no,true);
}
public Path moves()
{ EbbeFlut.chronical.newTurn(EbbeFlut.chronical.fromBeginning());
while(!EbbeFlut.chronical.isTurnFinished() && (!EbbeFlut.chronical.isGameFinished() || EbbeFlut.chronical.lastMoves()) ) {
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
return path;
}
}