Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 314 Bytes
defmodule Board.MapTuple do
@behaviour Board
def new do
# this is a bit unfair to all the others because it always
# being empty can be a quite sharp speed advantage
%{}
end
def get(board, x, y), do: board[{x, y}]
def set(board, x, y, value) do
Map.put(board, {x, y}, value)
end
end
You can’t perform that action at this time.