public void keyPressed(KeyEvent e) {
         
         
                torvalds =  GameManager.getTorvalds();
                gates = GameManager.getGates();
                int keys = e.getKeyCode();
                int itnext;
                set.add(keys);
                Iterator it = set.iterator(); 
                while(it.hasNext()){
                    itnext = (Integer)it.next();
                        if(itnext == KeyEvent.VK_ESCAPE){
                            InsultSmackFighter.stop();
                        }
                        if(itnext == KeyEvent.VK_ENTER ){
                            InsultSmackFighter.start();
                        }
                        
                        if(itnext == KeyEvent.VK_A){                         
                            torvalds.setXDisplacement(-1*steps,true);
                            torvalds.updateState(LEFT);
                        }
                        if(itnext == KeyEvent.VK_D){
                            torvalds.setXDisplacement(steps,true);
                            torvalds.updateState(RIGHT);
                        }
                        if(itnext == KeyEvent.VK_J){
                            gates.setXDisplacement(-1*steps,true);
                            gates.updateState(LEFT);
                        }
                        if(itnext == KeyEvent.VK_L){
                            gates.setXDisplacement(steps,true);
                            gates.updateState(RIGHT);
                        }
                        
                 }
             
      }