├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── empty.png │ │ │ │ ├── red.png │ │ │ │ ├── yellow.png │ │ │ │ ├── board_bg.png │ │ │ │ ├── cell_frame.png │ │ │ │ ├── chess_icon.png │ │ │ │ ├── chess_wall.jpg │ │ │ │ ├── connect4_icon.png │ │ │ │ ├── chess_background.jpg │ │ │ │ ├── chess_black_king.png │ │ │ │ ├── chess_black_pawn.png │ │ │ │ ├── chess_black_queen.png │ │ │ │ ├── chess_black_rook.png │ │ │ │ ├── chess_white_king.png │ │ │ │ ├── chess_white_pawn.png │ │ │ │ ├── chess_white_queen.png │ │ │ │ ├── chess_white_rook.png │ │ │ │ ├── chess_black_bishop.png │ │ │ │ ├── chess_black_knight.png │ │ │ │ ├── chess_white_bishop.png │ │ │ │ ├── chess_white_knight.png │ │ │ │ ├── gravity_balls_ball.png │ │ │ │ ├── gravity_balls_icon.png │ │ │ │ ├── snake_and_ladder_board.jpg │ │ │ │ ├── snake_and_ladder_dice.png │ │ │ │ ├── snake_and_ladder_icon.png │ │ │ │ ├── snake_and_ladder_image.png │ │ │ │ ├── snake_and_ladder_wall.jpg │ │ │ │ ├── gravity_balls_background.jpg │ │ │ │ ├── snake_and_ladder_player1.png │ │ │ │ ├── snake_and_ladder_player2.png │ │ │ │ ├── snake_and_ladder_players.png │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── strings.xml │ │ │ │ └── colors.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── anim │ │ │ │ └── falling.xml │ │ │ ├── menu │ │ │ │ └── game.xml │ │ │ ├── layout │ │ │ │ ├── activity_snake_and_ladder_last_page.xml │ │ │ │ ├── activity_snake_and_ladder_main.xml │ │ │ │ ├── board_row.xml │ │ │ │ ├── front_board_row.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_main_connect4.xml │ │ │ │ ├── activity_snake_and_ladder_board.xml │ │ │ │ └── activity_chess_main.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── dipansh │ │ │ │ └── asobimasu │ │ │ │ ├── connect4 │ │ │ │ ├── Cell.java │ │ │ │ ├── Board.java │ │ │ │ └── MainActivityConnect4.java │ │ │ │ ├── chess │ │ │ │ ├── pieces │ │ │ │ │ ├── Movable.java │ │ │ │ │ ├── Piece.java │ │ │ │ │ ├── Rook.java │ │ │ │ │ ├── Bishop.java │ │ │ │ │ ├── Pawn.java │ │ │ │ │ ├── King.java │ │ │ │ │ ├── Knight.java │ │ │ │ │ └── Queen.java │ │ │ │ └── data │ │ │ │ │ ├── Position.java │ │ │ │ │ └── Coordinates.java │ │ │ │ ├── snakeAndLadder │ │ │ │ ├── SnakeAndLadderLastPage.java │ │ │ │ ├── Block.java │ │ │ │ ├── Players.java │ │ │ │ ├── SnakeAndLadderMainActivity.java │ │ │ │ ├── Board.java │ │ │ │ ├── GamePlay.java │ │ │ │ └── SnakeAndLadderBoard.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── gravityBalls │ │ │ │ └── GravityBallsMainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── dipansh │ │ │ └── asobimasu │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── dipansh │ │ └── asobimasu │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── screenshots ├── Chess.png ├── gravityballs_1.png ├── gravityballs_2.png └── connect4_screenshot.jpeg ├── .idea ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .travis.yml ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /screenshots/Chess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/screenshots/Chess.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /screenshots/gravityballs_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/screenshots/gravityballs_1.png -------------------------------------------------------------------------------- /screenshots/gravityballs_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/screenshots/gravityballs_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/red.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/yellow.png -------------------------------------------------------------------------------- /screenshots/connect4_screenshot.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/screenshots/connect4_screenshot.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable/board_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/board_bg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/cell_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/cell_frame.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_wall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_wall.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/connect4_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/connect4_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_background.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_king.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_king.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_pawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_pawn.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_queen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_queen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_rook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_rook.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_king.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_king.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_pawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_pawn.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_queen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_queen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_rook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_rook.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_bishop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_bishop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_black_knight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_black_knight.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_bishop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_bishop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/chess_white_knight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/chess_white_knight.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/gravity_balls_ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/gravity_balls_ball.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/gravity_balls_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/gravity_balls_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_board.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_dice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_dice.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_wall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_wall.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/gravity_balls_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/gravity_balls_background.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_player1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_player1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_player2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_player2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/snake_and_ladder_players.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/drawable/snake_and_ladder_players.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DipanshKhandelwal/Asobimasu/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: android 3 | android: 4 | components: 5 | - platform-tools 6 | - tools 7 | - build-tools-26.0.2 8 | - android-26 9 | before_script: 10 | - chmod +x gradlew 11 | script: 12 | - ./gradlew assembleDebug 13 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Dec 01 10:05:14 IST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/anim/falling.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/menu/game.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/connect4/Cell.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.connect4; 2 | 3 | /** 4 | * Created by rachana on 12/12/2017. 5 | */ 6 | 7 | public class Cell { 8 | public boolean empty; 9 | public Board.Turn player; 10 | 11 | public Cell() { 12 | empty = true; 13 | } 14 | 15 | public void setPlayer(Board.Turn player) { 16 | this.player = player; 17 | empty = false; 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/chess/pieces/Movable.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.chess.pieces; 2 | 3 | import java.util.ArrayList; 4 | import com.example.dipansh.asobimasu.chess.data.Coordinates; 5 | import com.example.dipansh.asobimasu.chess.data.Position; 6 | 7 | /** 8 | * Created by dipansh on 1/12/17. 9 | */ 10 | 11 | public interface Movable { 12 | public ArrayList AllowedMoves(Coordinates coordinates , Position[][] board); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/dipansh/asobimasu/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Asobimasu 3 | 4 | 5 | UNDO 6 | Queen 7 | Bishop 8 | Rook 9 | Knight 10 | Game Over !! 11 | 12 | 13 | 14 | Settings 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/chess/data/Position.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.chess.data; 2 | 3 | import com.example.dipansh.asobimasu.chess.pieces.Piece; 4 | 5 | /** 6 | * Created by DIPANSH KHANDELWAL on 03-06-2017 7 | */ 8 | 9 | public class Position { 10 | private Piece piece; 11 | 12 | 13 | public Position(Piece piece ) { 14 | this.piece = piece; 15 | } 16 | 17 | public Piece getPiece() { 18 | return piece; 19 | 20 | } 21 | 22 | public void setPiece(Piece piece) { 23 | this.piece = piece; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/chess/data/Coordinates.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.chess.data; 2 | 3 | /** 4 | * Created by DIPANSH KHANDELWAL on 03-06-2017 5 | */ 6 | 7 | public class Coordinates { 8 | private int x; 9 | private int y; 10 | 11 | public Coordinates(int x, int y) { 12 | this.x = x; 13 | this.y = y; 14 | } 15 | 16 | public void setX(int x) { 17 | this.x = x; 18 | } 19 | 20 | public int getX() { 21 | return x; 22 | } 23 | 24 | public int getY() { 25 | return y; 26 | } 27 | 28 | public void setY(int y) { 29 | this.y = y; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/snakeAndLadder/SnakeAndLadderLastPage.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.snakeAndLadder; 2 | 3 | import com.example.dipansh.asobimasu.R; 4 | import android.content.Intent; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | 9 | public class SnakeAndLadderLastPage extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_snake_and_ladder_last_page); 15 | } 16 | 17 | public void onClickReplay(View view){ 18 | Intent replay = new Intent(SnakeAndLadderLastPage.this,SnakeAndLadderBoard.class); 19 | startActivity(replay); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/snakeAndLadder/Block.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.snakeAndLadder; 2 | 3 | /** 4 | * Created by lenovo on 09-12-2017. 5 | */ 6 | 7 | public class Block { 8 | public Block(){ 9 | block_id=0; 10 | block_value=0; 11 | jump_pos=0; 12 | } 13 | void setBlock_id(Block b,int i){ 14 | b.block_id=i; 15 | } 16 | void setValue(Block b,int i){ 17 | b.block_value=i; 18 | } 19 | void setJumpPos(Block b,int i){ 20 | b.jump_pos=i; 21 | } 22 | int getValue(){ 23 | return this.block_value; 24 | } 25 | int getJump(){ 26 | return this.jump_pos; 27 | } 28 | int get_id(){ 29 | return this.block_id; 30 | } 31 | private int block_id; 32 | private int block_value; 33 | private int jump_pos; 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/snakeAndLadder/Players.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.snakeAndLadder; 2 | 3 | /** 4 | * Created by lenovo on 09-12-2017. 5 | */ 6 | 7 | public class Players { 8 | 9 | private int player_pos; 10 | private boolean win_stat; 11 | private int rank; 12 | public Players(){ 13 | player_pos=0; 14 | win_stat=false; 15 | rank=0; 16 | } 17 | public int get_pos(){ 18 | return this.player_pos; 19 | } 20 | public void update_pos(int pos){ 21 | this.player_pos=pos; 22 | } 23 | public boolean IsWinner(){ 24 | return this.win_stat; 25 | } 26 | public int getRank(){ 27 | return this.rank; 28 | } 29 | public void setRank(int i){ 30 | this.rank=i; 31 | } 32 | public void set_win_stat(boolean ws){ 33 | this.win_stat=ws; 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/dipansh/asobimasu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.dipansh.asobimasu", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | #f0ba8c29 9 | #f0f0d157 10 | #a2ce2a7c 11 | #795e45e6 12 | #969b1be1 13 | #8dff0004 14 | #d9732b 15 | #898989 16 | 17 | 18 | 19 | #4A90E2 20 | #FFD918 21 | #FF000B 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/chess/pieces/Piece.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.chess.pieces; 2 | 3 | import com.example.dipansh.asobimasu.chess.data.Coordinates; 4 | import com.example.dipansh.asobimasu.chess.data.Position; 5 | 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * Created by DIPANSH KHANDELWAL on 03-06-2017 10 | */ 11 | 12 | public class Piece implements Movable{ 13 | 14 | private boolean white; 15 | 16 | public Piece(boolean white) { 17 | this.white = white; 18 | } 19 | 20 | 21 | 22 | public boolean isWhite() { 23 | return white; 24 | } 25 | 26 | public ArrayList AllowedMoves(Coordinates coordinates , Position[][] board){ 27 | ArrayList allowedMoves = new ArrayList<>(); 28 | Coordinates c; 29 | for(int i=0;i<8;i++){ 30 | for(int j=0;j<8;j++){ 31 | c = new Coordinates(i,j); 32 | allowedMoves.add(c); 33 | } 34 | } 35 | return allowedMoves; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "com.example.dipansh.asobimasu" 7 | minSdkVersion 21 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(dir: 'libs', include: ['*.jar']) 23 | implementation 'com.android.support:appcompat-v7:26.1.0' 24 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 25 | testImplementation 'junit:junit:4.12' 26 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 27 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 28 | implementation 'com.android.support:design:26.1.0' 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/dipansh/asobimasu/snakeAndLadder/SnakeAndLadderMainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.dipansh.asobimasu.snakeAndLadder; 2 | 3 | import com.example.dipansh.asobimasu.R; 4 | import android.content.Intent; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.widget.RelativeLayout; 9 | 10 | import com.example.dipansh.asobimasu.R; 11 | 12 | public class SnakeAndLadderMainActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_snake_and_ladder_main); 18 | RelativeLayout image = (RelativeLayout) findViewById(R.id.start_page); 19 | 20 | image.setOnClickListener(new View.OnClickListener() { 21 | @Override 22 | public void onClick(View view) { 23 | Intent board = new Intent(SnakeAndLadderMainActivity.this, SnakeAndLadderBoard.class); 24 | startActivity(board); 25 | } 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_snake_and_ladder_last_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 25 | 26 |