Refactored color and key codes in stateFunctions and added display functions in snake to be moved to stateFunctions eventually.