dayo92/SoltMachine

Loop over all rows just to check one single row

Closed this issue · 1 comments

Here you ask the user for one specific row, but actually loop through all rows:
image
(Notice that you never use your "row" loop variable)

Things you could do from here is

  • either only check the given row in the grid, there is for example no reason to check if there are matches in row 1 and 3 if the user selects 2
  • or allow the user to play multiple lines: if the user selects 1 this only checks the first row, for 2 the first and the middle and for 3 all lines. In this case I would also update the cost for each spin

The same applies for cols