package org.sms.tetris3d;

import android.content.Context;

import java.util.ArrayList;
import org.sms.tetris3d.players.*;
/**
 * Created by hsh on 2016. 11. 16..
 */

public class GameStatus extends com.trippleit.android.tetris3d.GameStatus{
    protected static final  ArrayList<User> players = new ArrayList<User>(){
        @Override
        public User remove(int idx){
            if(idx>0){
                return super.remove(idx);
            }
            else{
                return get(0);
            }
        }
        @Override
        public void clear(){
            final User usr = get(0);
            super.clear();
            add(usr);
        }
        @Override
        public boolean remove(Object usr){
            if(usr instanceof  DeviceUser){
                return false;
            }else{
                return super.remove(usr);
            }
        }
        @Override
        public void removeRange(int start,int end){
            super.removeRange(start>0?start:1,end>0?end:1);
        }
    };
    public ArrayList<User> getPlayers(){
        return players;
    }

    public void init(){
        players.add(new DeviceUser());
    }
    public static void init(Context _c) {
        gameHeight = 10;
        gridSize = 5;
        gStatus = GAME_STATUS.START;
        restartGameBoolMatrix();
        setCamera(-65, 10);
        start=true;
        end = false;
        startX = 2;
        startY = 2;
        dropFast = false;
    }
}

@@ -1041,16 +1041,23 @@
  public 
+static 
 ArrayLis
@@ -1108,17 +1108,16 @@
 ;%0A    %7D%0A
-%0A
     publ
@@ -1115,24 +1115,31 @@
 %0A    public 
+static 
 void init()%7B
@@ -1136,17 +1136,28 @@
 id init(
-)
+Context _c) 
 %7B%0A      
@@ -1193,56 +1193,8 @@
 ));%0A
-    %7D%0A    public static void init(Context _c) %7B%0A
     

fix gamemanager