Hello my name is Igor! I'm a beginner developer and began to study the swift, I recently solved the problem of the chessboard. The task condition is - (Chessboard 8x8, each value in the range 1 ... 8. For two given values for vertical and horizontal, define the color of the field.If you want to complicate the task, then instead of digits on the horizontal axis, use the letters a, b, c, d, e, f, g, x). If it's not hard to see my code that I wrote and tell me correctly, I did and how can I reduce or improve it?
let a = 1
let b = 2
let c = 3
let d = 4
let e = 5
let f = 6
let g = 7
let h = 8
let x = d
let y = 4
let cellNumber = (y * x) // Calculate the cell number and color
let colorBlack = cellNumber
if cellNumber >= 1 && cellNumber <= 64 && colorBlack == cellNumber {
print("Cell color black")
} else {
print("Cell color white")
}