Clock timer & End condition inquiry for issues fixing

17 views
Skip to first unread message

Kirito ryu

unread,
Dec 24, 2018, 8:41:12 AM12/24/18
to jwtc
Dear admin,

I have inquiry on the coding of the game as I am trying to fix the issues of the following for our university assignment:

We couldn't find the condition where the time could reset when a new game is added. resetTimer() seem to not have any usage. We tried to set the lclock value to 0 whenever a newGame() function is called, but still it would not affect the clock value. Which make us think, if is use in the main.java to set the clock, why it wouldn't work if we use it in main when a new game is called.

Next, the end game condition. We couldn't find the end game condition or even the line that print check mate, without identifying that, we could fix the issue where if one of the time of a player reach 0, we have to end the game.

I hope to get a respond as we really need you admins help. Thank you. If we are able to fix it, we don't mind contributing it to github.

Thank you.

Kirito ryu

unread,
Dec 26, 2018, 8:31:27 AM12/26/18
to jwtc
If not possible, a documentation of the game code is also sufficient.

Jeroen Carolus

unread,
Jan 7, 2019, 5:54:05 AM1/7/19
to jw...@googlegroups.com
Hi,

Can you describe/send the university assignment (I am just curious)? 
I will have a look if I can find how resetting the timer should work.

End game condition is a bit more complicated to fix - the app currently has no notion of resigned or time-up.

Cheers,
Jeroen

--

---
You received this message because you are subscribed to the Google Groups "jwtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jwtc+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeroen Carolus

unread,
Jan 10, 2019, 3:22:49 AM1/10/19
to jw...@googlegroups.com
Hi,

A solution could be to move setting the clock via the chess menu via settings instead.
Then, each time a new game is started, the `_chessView._lClockTotal` can be set to the value of the stored setting.

Building in notion of a finished game due to time up, resignation or agreed draw is a bit harder.
A solution could be to expand the PGN parser to understand the notations `1-0`, `0-1` etc. and reflect this in the game state. Then, when time is up, the `move` `1-0` van be written to PGN history.

Regards,
Jeroen



Kirito ryu

unread,
Jan 10, 2019, 7:37:35 AM1/10/19
to jwtc
Thanks for the tips. As for clock, I think I did what you said in the email, and it work, however some other problem came up, but is not really major. For the time up end game condition, I'll take a further look at it with what you have mentioned and see what I can do.

Thank you.

Regards,
Kirito ryu

Kirito ryu

unread,
Jan 10, 2019, 7:40:46 AM1/10/19
to jwtc
I'm so sorry that I cant disclose my assignment of my university as it is somehow copyrighted. However, the assignment is above software evolution. A software after deployment, what can of changes it went through and maintenance. Therefore, our assignment is to get a already deploy software on Github, and try to fix the issue stated for the program, and make a report based on our finding.

Kirito ryu

unread,
Jan 10, 2019, 8:11:08 AM1/10/19
to jwtc
Hi,

For the PGN parser you mention, which file is actually associated. I saw PGNEntry, PGNProvider, PGNColumn. I dont quite to find any resemblance to what u describe, or it could just be I did not fully understand it yet. 

Regards,
Kirito ryu

On Thursday, January 10, 2019 at 4:22:49 PM UTC+8, Jeroen wrote:

Jeroen Carolus

unread,
Jan 10, 2019, 8:27:32 AM1/10/19
to jw...@googlegroups.com
 `loadPGNMoves` in `GameControl` and `addPGNEntry` are of interest.
Talking about software maintenance... this was a pet project which was built without a plan.. gluing stuff together without enough refactoring during development. This makes it quite a challenge to maintain.
Also the fact that there is a built in engine and the option to use UCI engines without a proper abstraction layer may make this kind of fix problematic.
The other sections like Play online, puzzle or practice may have some easier improvements.
Reply all
Reply to author
Forward
0 new messages