I updated the class design with this information:
- I need a class Translator. For now, it will be a new actor, so in the package Actors there is a new class. It have some methods.
- This class have two methods: coordinateToPosition, that translates a coordinate to a position in the array. It takes 2 arguments: the coordinate and the size of the board. The other method is positionToCoordinate that translates from a position in the board array to a coordinate.
- There is also a private variable, coord, that have all the coordinates first part. It is needed to change it to a number. For example A=0 (0 is the position and will be the value), B=1, etc.
The code:
No comments:
Post a Comment