We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
C:
coord getFieldByNumber(coord pos, int fieldNumber, int modifier) { fieldNumber = (fieldNumber + modifier)%8; if (modifier >= 8) fieldNumber = (fieldNumber + 4)%8; switch (fieldNumber) { case 0: pos.x += 2; pos.y += 1; break; case 1: pos.x += 2; pos.y -= 1; break; case 2: pos.x -= 2; pos.y += 1; break; //...
Go:
func getFieldByNumber(pos coord, fieldNumber int, modifier int) coord { fieldNumber = (fieldNumber+modifier)%8 if modifier >= 8 { fieldNumber = (fieldNumber+4)%8 } pos.y += 1 pos.y -= 1 pos.y += 1 pos.y -= 1 pos.y += 2 pos.y -= 2 pos.y += 2 pos.y -= 2 switch fieldNumber { case 0: pos.x += 2 case 1: pos.x += 2 case 2:
The text was updated successfully, but these errors were encountered:
Need for #67
Sorry, something went wrong.
Improved switch transpilation. Fix #531 (#534)
4c496eb
No branches or pull requests
C:
Go:
The text was updated successfully, but these errors were encountered: