defp new() do {
north_c = [ ]
north_d = [ ]
north_h = [ ]
north_s = [ ]
south_c = [ ]
south_d = [ ]
south_h = [ ]
south_s = [ ]
east_c = [ ]
east_d = [ ]
east_h = [ ]
east_s = [ ]
west_c = [ ]
west_d = [ ]
west_h = [ ]
west_s = [ ]
north = [north_c, north_d, north_h, north_s]
south = [south_c, south_d, south_h, south_s]
east = [east_c, east_d, east_h, east_s]
west = [west_c, west_d, west_h, west_s]
game = [north, south, east, west]
}
end
Hello! I would like to create a function which will return “game” object.
I wrote the code above, but I am not sure if that approach makes sense.
Moreover, when I try to compile this,
it gives me the following error:
== Compilation error in file assign2.ex ==
** (SyntaxError) assign2.ex:19: syntax error before: north_d
(elixir) lib/kernel/parallel_compiler.ex:208: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
** (CompileError) compile error
(iex) lib/iex/helpers.ex:200: IEx.Helpers.c/2
I will really appreciate any explanation and help.
Thank you!