Tuesday, April 18, 2023

Reactions to the User Input

Hello,

in the lastest part of the works I made a lot of things 💪

I prepared the system enabling to use user input in code as integers. The extracted integers serve as board's location points. They are indexes of board's cells.

I added the health and the id attributes to the spider class. Health and id are parameters of spider constructor. Id is based on row where spider's skin pattern was put. Health is a value from enum.

Initially I was thinking of using the length of spider's skin pattern as health but that would be too boring.

I introduced creating spiders as objects after putting their skins patterns on the board. 

The amount of spider objects is a condition that determines the continuation of the game.

The main class has now the possibility to run the game.

Another challenge concerns working with spider remnants and then with the visible game board. 

It is important to show the correct board to the user 😉

Regards!

napu