Package general.exceptions

Examples of general.exceptions.IllegalPlayerCountException


      Vector<Vector2f> mc_spawnpoints2 = new Vector<Vector2f>();


      if (playercount > 4 || playercount < 2) {
        throw new IllegalPlayerCountException("Ungueltige Spieleranzahl!", playercount);
      }
      mc_spawnpoints2.add(new Vector2f(10, 10));
      mc_spawnpoints2.add(new Vector2f(20,20));
      if (playercount >=3) {
        mc_spawnpoints2.add(new Vector2f(10,20));

        if (playercount == 4) {
          mc_spawnpoints2.add(new Vector2f(20,10));
        }
      }

      //map fuellen
      for (int i=0; i<10000; i++)
        for(int j=0; j<10000; j++)
        {
          if(i<5||i>=25||j<5||j>=25)
          {
            data2[i][j] = OldMap.TERRAIN_WATER;
          }
          else if (i>13&&i<18&&j>13&&j<18)
          {
            data2[i][j] = OldMap.TERRAIN_FORREST;
          }
          else
          {
            data2[i][j] = OldMap.TERRAIN_GRASS;
          }
        }

      return new OldMap(data2,30,30,mc_spawnpoints2);
     

    case TEMPLATE_ISLAND:
    default:
      byte[][] data = new byte[10000][10000];

      Vector<Vector2f> mc_spawnpoints = new Vector<Vector2f>();


      if (playercount > 4 || playercount < 2) {
        throw new IllegalPlayerCountException("Ungueltige Spieleranzahl!", playercount);
      }
      mc_spawnpoints.add(new Vector2f(10, 10));
      mc_spawnpoints.add(new Vector2f(20,20));
      if (playercount >=3) {
        mc_spawnpoints.add(new Vector2f(10,20));
View Full Code Here

TOP

Related Classes of general.exceptions.IllegalPlayerCountException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.