Do you know any way/algorithm to rotate a piece in Tetris? The programming language is Jess...
Thank you for any helpful suggestion.
Do you know any way/algorithm to rotate a piece in Tetris? The programming language is Jess...
Thank you for any helpful suggestion.
I don't know how to do it in Jess, but on one of the original Tetris' (C64 version, mostly written in compiled basic), the rotations were stored separately, as there wasn't the computing power to work out what the rotations would be, dynamically.
The best way to write Jess code to work with Tetris pieces, would be to write a Java library of objects to represent the Tetris pieces, including operations like rotation, and then manipulate those objects from Jess. Use each language for the things it does best.