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

Convert to scala #1

Merged
merged 145 commits into from Jan 3, 2018

Conversation

Projects
None yet
4 participants
@BusyByte
Owner

BusyByte commented Aug 6, 2017

No description provided.

@BusyByte

This comment has been minimized.

Owner

BusyByte commented Aug 6, 2017

@raxod502 why is this continually assigning to the same element in the array all the chunks?
only the last one in the chunkTemp list will end up getting assigned

for (i=0; i<chunkTemp.size(); i++) {
     temporarySaveFile[twy][twx] = chunkTemp.get(i);
}
@raxod502

This comment has been minimized.

raxod502 commented Aug 6, 2017

Unfortunately, I have not the faintest idea.

Just looking at the structure of the surrounding code, maybe it was meant to be wrapped in twy and twx loops and an if statement to check if its cx and cy attributes were equal to twx and twy.

                                                for (twy=0; twy<2; twy++) {
                                                    for (twx=0; twx<2; twx++) {
                                                        for (i=chunkTemp.size()-1; i>-1; i--) {
                                                            if (chunkTemp.get(i).cx == twx && chunkTemp.get(i).cy == twy) {
                                                                chunkMatrix[twy][twx] = chunkTemp.get(i);
                                                                chunkTemp.remove(i);
                                                                break;
                                                            }
                                                        }
                                                        if (chunkMatrix[twy][twx] == null) {
                                                            if (temporarySaveFile[twy][twx] != null) {
                                                                chunkMatrix[twy][twx] = temporarySaveFile[twy][twx];
                                                            }
                                                            else {
                                                                chunkMatrix[twy][twx] = new Chunk(twx+ou, twy+ov);
                                                            }
                                                        }
                                                    }
                                                }
@raxod502

This comment has been minimized.

raxod502 commented Oct 16, 2017

what is the value in BLOCKLIGHTS? the key seems to be block id but I was wondering if the value seems to be some kind of light intensity?

Yes, light values range from 0 to 21 (although it's not a hard maximum), with sunlight providing a level of 19. The light level decreases by 1 for each square traveled away from a source.

I'm also wondering why if blocks have zero light intensity the block would be considered empty

It's hard to say given that the empty method is not used anywhere.

BusyByte added some commits Oct 18, 2017

changing keyevent handling to use pattern matching, not sure if shift…
… logic is right as vk exist for a lot of those

@BusyByte BusyByte merged commit f8104fa into master Jan 3, 2018

@BusyByte BusyByte deleted the convert-to-scala branch Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment