Implemented LightBoard class, which is the super class of Board, to avoid calling malloc() too many times.