Score problem

my function for keeping score does not make sense. For now I have North,
South, East, and West working fine. I do not have any inventory and my
score does not work. Also, div element might be useless, I can use a
local style, it is just a position of the textarea.