aditeya / ninemensmorris Goto Github PK
View Code? Open in Web Editor NEWNine Men's Morris game written in Java
License: GNU General Public License v3.0
Nine Men's Morris game written in Java
License: GNU General Public License v3.0
There seems to be no infrastructure in place that tells the player what is actually going on when an incorrect move is played, it simply asks the player for a new move.
NMMLogic.java: lines 9, 11, 14 and 15
NMMLogicDemo.java: lines 12
When a new mill is detected, and a coin is attempted to be removed, the code loops seemingly for no reason. The coin is not milled as far as the game board shows.
Every so often the screen goes blank, or only shows the bg, and a null pointed error is thrown.
This might be caused by incorrect file hierarchy, Check your local repository and ensure it's inline with the remote repository, before pushing from local to remote.
This bug prevents the files from running on local machines that have pulled from the remote repo
everytime button is pressed a new socket is created
Just comment your code man, the grasshoppers hit list is too dang long, take some pity on him
noteworthy on is D3
Rooms Architecture
client -> server # join and request
server -> client # send room availability
client -> server # refresh request
server -> client # send room availability
client -> server # choose a room
server -> client # gives access or if room take asks to choose again
switch to game mode
We would need to implement this, but the question is how?
...
Exception in thread "Thread-6" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
...
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
at javafx.scene.Parent$2.onProposedChange(Parent.java:367)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:113)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:108)
at com.sun.javafx.scene.control.skin.LabeledSkinBase.updateChildren(LabeledSkinBase.java:575)
at com.sun.javafx.scene.control.skin.LabeledSkinBase.handleControlPropertyChanged(LabeledSkinBase.java:204)
at com.sun.javafx.scene.control.skin.LabelSkin.handleControlPropertyChanged(LabelSkin.java:49)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase.lambda$registerChangeListener$0(BehaviorSkinBase.java:197)
at com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler$1.changed(MultiplePropertyChangeListenerHandler.java:55)
at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:89)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:103)
at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:144)
at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
at javafx.scene.control.Labeled.setText(Labeled.java:145)
at ninemensmorris.nmmguisample.NMMGUIBoardThread.run(NMMGUIBoardThread.java:195)
at java.lang.Thread.run(Thread.java:748)
...
Exception in thread "Thread-6" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
coin at G2 = EMPTY
index= 6:2
coin at G3 = EMPTY
index= 7:0
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279)
coin at H1 = EMPTY
index= 7:1
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
coin at H2 = EMPTY
index= 7:2
at javafx.scene.Parent$2.onProposedChange(Parent.java:367)
coin at H3 = EMPTY
Creating COn
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:329)
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:221)
at javafx.scene.Parent$1.onChanged(Parent.java:246)
at com.sun.javafx.collections.TrackableObservableList.lambda$new$0(TrackableObservableList.java:45)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at javafx.collections.ModifiableObservableListBase.addAll(ModifiableObservableListBase.java:102)
at com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:237)
at com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:103)
Creating Content with componets is bcs
at javafx.scene.layout.HBox.<init>(HBox.java:249)
at ninemensmorris.nmmguisample.NMMGUIBoardThread.createContent(NMMGUIBoardThread.java:80)
BCS = [H1, G1, H2, F1, G2, H3, E1, F2, G3, D1, E2, F3, C1, D2, E3, B1, C2, D3, A1, B2, C3, A2, B3, A3]
at ninemensmorris.nmmguisample.NMMGUIBoardThread.run(NMMGUIBoardThread.java:145)
slot = H1 type =EMPTY pos 100.0
at java.lang.Thread.run(Thread.java:748)
slot = G1 type =EMPTY pos 200.0
Exception in thread "Thread-6" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
slot = H2 type =EMPTY pos 350.0
slot = F1 type =EMPTY pos 300.0
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279)
slot = G2 type =EMPTY pos 350.0
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
slot = H3 type =EMPTY pos 600.0
at javafx.scene.Parent$2.onProposedChange(Parent.java:367)
slot = E1 type =EMPTY pos 400.0
slot = F2 type =EMPTY pos 350.0
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:329)
slot = G3 type =EMPTY pos 500.0
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:221)
slot = D1 type =EMPTY pos 100.0
at javafx.scene.Parent$1.onChanged(Parent.java:246)
slot = E2 type =EMPTY pos 500.0
slot = F3 type =EMPTY pos 400.0
at com.sun.javafx.collections.TrackableObservableList.lambda$new$0(TrackableObservableList.java:45)
slot = C1 type =EMPTY pos 300.0
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
slot = D2 type =EMPTY pos 200.0
slot = E3 type =EMPTY pos 600.0
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
slot = B1 type =EMPTY pos 200.0
at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
slot = C2 type =EMPTY pos 350.0
slot = D3 type =EMPTY pos 300.0
at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
slot = A1 type =WHITE pos 100.0
at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
slot = B2 type =EMPTY pos 350.0
at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:155)
slot = C3 type =EMPTY pos 400.0
at java.util.AbstractList.add(AbstractList.java:108)
slot = A2 type =BLACK pos 350.0
at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:209)
slot = B3 type =EMPTY pos 500.0
slot = A3 type =EMPTY pos 600.0
at ninemensmorris.nmmguisample.NMMGUIBoardThread.createContent(NMMGUIBoardThread.java:88)
at ninemensmorris.nmmguisample.NMMGUIBoardThread.run(NMMGUIBoardThread.java:145)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "Thread-6" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
at javafx.scene.Parent$2.onProposedChange(Parent.java:367)
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:329)
at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:221)
at javafx.scene.Parent$1.onChanged(Parent.java:246)
at com.sun.javafx.collections.TrackableObservableList.lambda$new$0(TrackableObservableList.java:45)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at javafx.collections.ModifiableObservableListBase.addAll(ModifiableObservableListBase.java:102)
at com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:237)
at com.sun.javafx.collections.VetoableListDecorator.addAll(VetoableListDecorator.java:103)
at ninemensmorris.nmmguisample.NMMGUIBoardThread.createContent(NMMGUIBoardThread.java:90)
at ninemensmorris.nmmguisample.NMMGUIBoardThread.run(NMMGUIBoardThread.java:145)
at java.lang.Thread.run(Thread.java:748)
BUILD STOPPED (total time: 52 seconds)
happens when when you send a coin from the second player on its first turn
ant -f /home/aditeya/NetBeansProjects/NineMensMorris -Dnb.internal.action.name=javadoc javadoc
init:
Warning: Leaving out empty argument '-windowtitle'
Generating Javadoc
Javadoc execution
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMApplication.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogicDemo.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/enums/InputType.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/enums/MCoinType.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/enums/PlayerTurn.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/enums/PrintType.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NCommand.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NMMClientThread.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NMMServiceThread.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NMMboard.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NMMmove.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/NetworkCommand.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/Rooms.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/Server.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/demo/NMMClientDemo.java...
Loading source file /home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/networking/demo/NMMServerDemo.java...
Constructing Javadoc information...
Standard Doclet version 1.8.0_282
Building tree for all the packages and classes...
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:94: warning: no description for @param
* @param coinType
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:95: warning: no description for @param
* @param coinSlot
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:96: warning: no description for @param
* @param milled
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:97: warning: no description for @param
* @param vldMvs
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:98: warning: no description for @param
* @param millCombo
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:62: warning: no description for @param
* @param coinSlot
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:76: warning: no description for @param
* @param coinSlot
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:77: warning: no description for @param
* @param milled
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:78: warning: no description for @param
* @param vldMvs
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMCoin.java:79: warning: no description for @param
* @param millCombo
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1089: error: @param name not found
* @param coinFrom
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1089: warning: no description for @param
* @param coinFrom
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1090: error: @param name not found
* @param coinTo
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1090: warning: no description for @param
* @param coinTo
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1091: warning: no description for @param
* @param coinIN
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1092: warning: no description for @param
* @param verbose
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogic.java:1307: warning: no @param for nmmBoard
public static void cmdPrint(NMMCoin[][] nmmBoard, PrintType type) {
/home/aditeya/NetBeansProjects/NineMensMorris/src/ninemensmorris/NMMLogicDemo.java:38: warning: no @throws for java.lang.InterruptedException
public static void main(String[] args) throws InterruptedException {
Building index for all the packages and classes...
Building index for all classes...
Generating /home/aditeya/NetBeansProjects/NineMensMorris/dist/javadoc/help-doc.html...
2 errors
16 warnings
/home/aditeya/NetBeansProjects/NineMensMorris/nbproject/build-impl.xml:1216: Javadoc returned 1
BUILD FAILED (total time: 0 seconds)
@EltoCode you're welcome ;)
Probable Fixes: Remove a millCheck() from code, or add empty type detection in millCheck()
Check commented code for conflicts that were overlooked
Comment your code, so is the wisdom of the grasshopper.
If you don't comment your code, the grasshopper will kill you in your sleep tonight.
It can use the static command to print out the board saving lines of code
Even though clients moves update the server board, the client does not then receive the updated server board.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.