Android Open Source - Tetris-Evolution Darwin Mode






From Project

Back to project page Tetris-Evolution.

License

The source code is released under:

GNU General Public License

If you think the Android project Tetris-Evolution listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mygdx.modes;
//from   w w w .ja  va 2  s  .  c o  m
import com.mygdx.blocks.Block;
import com.mygdx.blocks.Connect;
import com.mygdx.blocks.Level;
import com.mygdx.blocks.LogicScheme;

public class DarwinMode extends Mode{
  
  private static int widthBlock = 32;
  private static int heightBlock = 32;
  private static int rotation = 0;
  
  private static int width = 5;
  private static int height = 7;
  
  private static float speedFalling = -50;
  
  private static String texturePackName = "textureSet.png";
  
  private LogicScheme scheme = new LogicScheme();
  
  public DarwinMode(){
    super(width, height, widthBlock, heightBlock, texturePackName);
    
    scheme.addBlock(0, new Block(0f, 110f, widthBlock, heightBlock, rotation, 0, 0, speedFalling * 2));
    scheme.addBlock(1, new Block(0f, 110f, widthBlock, heightBlock, rotation, 1, 1, speedFalling));
    scheme.addBlock(2, new Block(0f, 0f, widthBlock, heightBlock, rotation, 2, 2, speedFalling));
    scheme.addBlock(3, new Block(0f, 0f, widthBlock, heightBlock, rotation, 3, 3, speedFalling));
    
    scheme.addConnect(new Connect(new int[][]{{0, 0}, {-1, 0}, {1, 0}}, new int[]{0, 0, 0}, new int[]{1, -1, -1}));
    scheme.addConnect(new Connect(new int[][]{{0, 0}, {-1, 0}, {-2, 0}}, new int[]{0, 0, 0}, new int[]{1, -1, -1}));
    scheme.addConnect(new Connect(new int[][]{{0, 0}, {1, 0}, {2, 0}}, new int[]{0, 0, 0}, new int[]{1, -1, -1}));
    
    scheme.addLevel(0, new Level(new int[]{0}, new int[]{1}, new int[]{0})); //What i need to this level, value block, what i want get
    scheme.addLevel(1, new Level(new int[]{1}, new int[]{1}, new int[]{1}));
    scheme.addLevel(2, new Level(new int[]{2}, new int[]{1}, new int[]{2}));
    
    super.setScheme(scheme);
  }
  
  public void update(float delta){
    super.update(delta);
  }
}




Java Source Code List

com.mygdx.TetrisEvolution.android.AndroidLauncher.java
com.mygdx.TetrisEvolution.client.HtmlLauncher.java
com.mygdx.TetrisEvolution.desktop.DesktopLauncher.java
com.mygdx.blocks.Block.java
com.mygdx.blocks.BlocksBox.java
com.mygdx.blocks.Connect.java
com.mygdx.blocks.Level.java
com.mygdx.blocks.LogicScheme.java
com.mygdx.game.Game.java
com.mygdx.main.TetrisEvolution.java
com.mygdx.modes.DarwinMode.java
com.mygdx.modes.Mode.java
com.mygdx.renderer.ModeRenderer.java
com.mygdx.states.Info.java
com.mygdx.states.MainMenu.java
com.mygdx.states.ModeMenu.java
com.mygdx.states.Play.java
com.mygdx.states.Splash.java
com.mygdx.tools.GifDecoder.java
com.mygdx.tools.InvertXY.java
com.mygdx.tools.Resources.java
com.mygdx.util.Collision.java