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

Games constructor requires cols & rows in reverse order when it shouldn't #73

Open
KyleReto opened this issue Jun 23, 2020 · 3 comments
Assignees

Comments

@KyleReto
Copy link

The python bridges library is inconsistent with the other versions. When creating a game off of NonBlockingGame (and maybe BlockingGame, I haven't tried), the other language libraries require (cols, rows), but the python version requires (rows, cols).

The documentation doesn't list the parameters correctly, so it's probably just a bug in the code, nowhere else.

@KyleReto KyleReto added bug and removed bug labels Jun 23, 2020
@krs-world
Copy link
Contributor

I looked at the 3 clients.. the game grid and its parent, grid accept arguments rows, cols. There was some incorrect labeling of the functions, perhaps.. from what I can tell.

On the SpaceInvaders solutions, you should pass the size as. rows followed by columns. The applications works fine in Java and C++ (though I am a poor player to test it, but there were no errors). The python version I fixed the size issues, but issues come from addressing the grid elements -- I suspect you are calling the row, col indices in the opposite order. Check it out.

Also test the Java and C++ version. My modifications were mainly in the assignment, not the client.

@krs-world
Copy link
Contributor

grid should be addressed with grid[i][j], where i is the row, j is the column.

@krs-world
Copy link
Contributor

I have fixed the python client for this issue - Kyle, check it out. I pushed the client to git, so you need to point to that version to test your code. I ran the input_game example and was able to change the rows, columns and now it does the right thing.. The public versions will need updating at some point..

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

No branches or pull requests

2 participants