Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infinite mode #55

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add infinite mode #55

wants to merge 4 commits into from

Conversation

chocochino
Copy link

This is the infinite mode I had referenced in issue #51. Could you please review it?

Also, I had a bit of hard time figuring out how to create icons with Photoshop, and infinite marks are not naturally square-shaped. To indicate that player was using infinite mode, I decided to change the game over reason to "made wrong move" since we can assume that's what happened.


public static Piece[] validateBlock(Piece[] holder, Board board) {
long invocationTime = System.nanoTime();
State initialState = new State(board);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, we're rebuilding the entire state every time we need to validate a piece instead of keeping it in synchrony with the board itself. Though it's true this is only ran when more pieces are needed and that's not common, so I believe it's okay.

@Lonami
Copy link
Member

Lonami commented Oct 20, 2018

Despite the fact you should reformat the file so the style is consistent, the code itself looks alright. A bit too much of copy-pasting from Board but I understand it's a first prototype and this can always be further integrated later. Some parts should be commented or explained.

@Lonami
Copy link
Member

Lonami commented Oct 20, 2018

Regarding the icons, those are no problem. I can add them with the rest at https://github.com/LonamiWebs/Klooni1010/blob/master/original-resources/buttons.svg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants