java.lang.Object
cz.cvut.fel.pjv.TimeClock.TheClock
- All Implemented Interfaces:
java.lang.Runnable
public class TheClock
extends java.lang.Object
implements java.lang.Runnable
Class for manipulation with the ChessClock.
-
Constructor Summary
Constructors Constructor Description TheClock(double timeLets)The ChessClock constructor. -
Method Summary
Modifier and Type Method Description java.lang.ThreadgetThr()doublegetTimeLefts()booleanisClockEnded()Check if the clock has been ended.booleanisThreadSuspended()voidrun()voidsetThr(java.lang.Thread thr)voidsetThreadSuspended(boolean threadSuspended)voidsetTimeLefts(int timeLefts)voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TheClock
public TheClock(double timeLets)The ChessClock constructor.- Parameters:
timeLets-
-
-
Method Details
-
setTimeLefts
public void setTimeLefts(int timeLefts) -
setThr
public void setThr(java.lang.Thread thr) -
setThreadSuspended
public void setThreadSuspended(boolean threadSuspended) -
getThr
public java.lang.Thread getThr() -
isThreadSuspended
public boolean isThreadSuspended() -
getTimeLefts
public double getTimeLefts() -
start
public void start() -
stop
public void stop() -
run
public void run()- Specified by:
runin interfacejava.lang.Runnable
-
isClockEnded
public boolean isClockEnded()Check if the clock has been ended.- Returns:
-