Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
snake-crystal
main
Interaction
Snake
Apple
Coordinate
Game
Player
Directions
Tail
World
Built with Crystal 1.9.2
2023-10-07 18:43:00 UTC
class
Snake::Coordinate
Snake::Coordinate
Reference
Object
Defined in:
snake/coordinate.cr
Constructors
.new
(x : Int16, y : Int16)
Instance Method Summary
#+
(other)
#-
(other)
#==
(other : Coordinate)
#x
: Int16
#y
: Int16
Constructor Detail
def self.
new
(x : Int16, y : Int16)
#
[
View source
]
Instance Method Detail
def
+
(other)
#
[
View source
]
def
-
(other)
#
[
View source
]
def
==
(other :
Coordinate
)
#
[
View source
]
def
x
: Int16
#
[
View source
]
def
y
: Int16
#
[
View source
]