Pau
09/02/2020, 4:14 PMX is mine
. there are not mines around
Milan Hruban
09/02/2020, 5:54 PMPau
09/02/2020, 6:06 PMprivate fun calMines
private fun showMines
Pau
09/02/2020, 7:54 PMMichael de Kaste
09/03/2020, 6:48 AMPau
09/03/2020, 9:25 AMMichael de Kaste
09/03/2020, 9:30 AM12
character. Characters are represented by a number. So if you ask for for 12.toChar(), you'll get the 12th character on the ascii table.
Now if you would say .toString(), you're saying you want to integer exactly as it is shown, but in a string, so 1.toString() becomes "1". Since "1" is a string, and not a character, the first character of that string is the character you're looking for.
And thus 1.toChar() gives you a weird character, and 1.toString()[0] gives you the actual characterPau
09/03/2020, 9:41 AMSo if you ask for for 12.toChar(), you'll get the 12th character on the ascii table.
My mind dealed with this but at the same time I was thinking that if the number was <10 (two units) it should convert it in a number char.
Thanks again!Michael de Kaste
09/03/2020, 9:42 AM