pl/mbogusz3/invaders/controller/eventHandlers/OnKeyDownEvent.java
/**
	 * Handle "keyDown" event by calling model's {@link InvadersModel#setKeyDown(int)} method.
	 * @param payload payload of event to handle, should contain Integer on "keyCode" field.
	 */
Handle "keyDown" event by calling model's  InvadersModel#setKeyDown(int) method.
@param payload payload of event to handle, should contain Integer on "keyCode" field.
Handle " keyDown " event by calling model ' s InvadersModel#setKeyDown ( int ) method . @param payload payload of event to handle should contain Integer on " keyCode " field .
public void execute(HashMap<String, String> payload) {
		int keyCode = Integer.parseInt(payload.get("keyCode"));
		if(keyCode > 255 || model.getKeyState(keyCode)) {
			return;
		}
		synchronized (model) {
			model.setKeyDown(keyCode);
		}
	}
public void execute ( HashMap < String , String > payload ) { int keyCode = Integer . parseInt ( payload . get ( "keyCode" ) ) ; if ( keyCode > 255 || model . getKeyState ( keyCode ) ) { return ; } synchronized ( model ) { model . setKeyDown ( keyCode ) ; } }
Handle "keyDown" event by calling model's {@link InvadersModel#setKeyDown(int)} method.
Handle " keyDown " event by calling model ' s { @link InvadersModel#setKeyDown ( int ) } method .
// Ignore extended keymap buttons and deduplicate