Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
fixed clock id starting from 1
Browse files Browse the repository at this point in the history
  • Loading branch information
V3lop5 committed Mar 7, 2021
1 parent 58606b9 commit fa100e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/ClockWall.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.adclock.model

class ClockWall(val sizeX: Int, val sizeY: Int) {

val clocks = Array(sizeX * sizeY) { Clock(it, it / sizeX, it % sizeX) }
val clocks = Array(sizeX * sizeY) { Clock(it+1, it / sizeX, it % sizeX) }

fun getClock(x: Int, y: Int) = clocks[sizeX * x + y]
}

0 comments on commit fa100e3

Please sign in to comment.