import React from 'react';
import Entity from '../entity/entity-component';
import styles from './board-style';

export default ({board, entities, toggleValue}) => (
  <div style={styles.comp}>
    {
      board.map((row, x) => {
        return (
          <div key={x} style={styles.row}>
            {
              row.map((column, y) => {
                const id = `${x}|${y}`;
                return (
                  <div key={id} style={styles.column}>
                    <Entity
                      id={id}
                      value={entities.details[id].value}
                      toggleValue={toggleValue}
                      colour={entities.details[id].colour}
                      />
                  </div>
                );
              })
            }
          </div>
        );
      })
    }
  </div>
);

@@ -215,17 +215,17 @@
 p((row, 
-x
+y
 ) =%3E %7B%0A 
@@ -260,17 +260,17 @@
 iv key=%7B
-x
+y
 %7D style=
@@ -328,17 +328,17 @@
 column, 
-y
+x
 ) =%3E %7B%0A 

Fix variable names