Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.idea/
target/
27 changes: 27 additions & 0 deletions monopoly.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.8" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.13-beta-3" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.8" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-all:1.8.5" level="project" />
</component>
</module>
84 changes: 84 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>monopoly</groupId>
<artifactId>monopoly</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>
<!-- using object mapper for serialization and deserialization -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.8</version>
</dependency>
<!-- For writing unit test cases -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<!-- For json property -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.8</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.inject/guice -->
<!-- for dependency injection. I am bored of manually injecting them -->
<!-- <dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.0</version>
</dependency>-->

<!-- To mock objects in unit test cases -->
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all/1.9.0 -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>

<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>mavenrepo</id>-->
<!-- <name>maven repo</name>-->
<!-- <url>https://mvnrepository.com/artifact/</url>-->
<!-- </repository>-->

<!-- </repositories>-->


</project>
12 changes: 12 additions & 0 deletions src/main/configuration/bank.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"icon": "abc.ico",
"initialMoney": 54000,
"currency":{
"ONES": 180,
"FIVES": 180,
"TWENTIES": 216,
"FIFTIES": 108,
"HUNDREDS": 72,
"FIVE_HUNDREDS":72
}
}
34 changes: 34 additions & 0 deletions src/main/configuration/card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"id": 9,
"name": "Community card",
"type": "CARD",
"icon": "abc.ico",
"color": "PINK",
"description": "Pick a community card"
},
{
"id": 18,
"name": "Community card",
"type": "CARD",
"icon": "abc.ico",
"color": "PINK",
"description": "Pick a community card"
},
{
"id": 26,
"name": "Chance card",
"type": "CARD",
"icon": "abc.ico",
"color": "PINK",
"description": "Pick a chance card"
},
{
"id": 39,
"name": "Chance card",
"type": "CARD",
"icon": "abc.ico",
"color": "PINK",
"description": "Pick a chance card"
}
]
210 changes: 210 additions & 0 deletions src/main/configuration/city.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
[
{
"id": 1,
"name": "Bangalore",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Bangalore is considered as the IT capital of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 450,
"rent": 45,
"mortgage": 90
},
{
"id": 2,
"name": "Mumbai",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Mumbai is considered as the financial capital of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 500,
"rent": 50,
"mortgage": 100
},
{
"id": 4,
"name": "New Delhi",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Delhi is considered as the IT capital of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 550,
"rent": 55,
"mortgage": 110
},
{
"id": 6,
"name": "Kolkata",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Kolkata is an ancient and prominent city of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 400,
"rent": 40,
"mortgage": 80
},
{
"id": 7,
"name": "Chennai",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Chennai is a metro and prominent city of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 400,
"rent": 40,
"mortgage": 80
},
{
"id": 12,
"name": "Varanasi",
"type": "CITY",
"icon": "abc.ico",
"color": "GREEN",
"description": "Varanshi also known as Kashi is the spiritual capital of the world",
"homestaysCount": 0,
"resortsCount": 0,
"price": 200,
"rent": 20,
"mortgage": 40
},
{
"id": 14,
"name": "Prayagraj",
"type": "CITY",
"icon": "abc.ico",
"color": "GREEN",
"description": "Prayagraj is the confluence of three prominent rivers of India call Ganga, Saraswati and Yamuna",
"homestaysCount": 0,
"resortsCount": 0,
"price": 240,
"rent": 24,
"mortgage": 48
},
{
"id": 16,
"name": "Haridwar",
"type": "CITY",
"icon": "abc.ico",
"color": "GREEN",
"description": "Haridwar is the spiritual city of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 240,
"rent": 24,
"mortgage": 48
},
{
"id": 17,
"name": "Hampi",
"type": "CITY",
"icon": "abc.ico",
"color": "GREEN",
"description": "Humpi is the famous city of temples in India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 100,
"rent": 10,
"mortgage": 20
},
{
"id": 21,
"name": "Agartala",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Agartala is a famous city of eastern India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 100,
"rent": 10,
"mortgage": 20
},
{
"id": 24,
"name": "Panaji",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Panaji is famous place among tourists in India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 180,
"rent": 18,
"mortgage": 36
},
{
"id": 27,
"name": "Ooty",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Ooty is a prominent hill station in the Nilgiri biosphere of southern India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 150,
"rent": 15,
"mortgage": 30
},
{
"id": 29,
"name": "Gangtok",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Gangtok is the himalayan city of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 100,
"rent": 10,
"mortgage": 20
},
{
"id": 31,
"name": "Jalandhar",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Jalandhar is city in the state of Punjab in India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 80,
"rent": 8,
"mortgage": 16
},
{
"id": 33,
"name": "Hyderabad",
"type": "CITY",
"icon": "abc.ico",
"color": "BLUE",
"description": "Hyderabad is prominent city of India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 400,
"rent": 40,
"mortgage": 80
},
{
"id": 38,
"name": "Ladakh",
"type": "CITY",
"icon": "abc.ico",
"color": "YELLOW",
"description": "Ladakh is in the lap of himalayas and is a prominent tourist destination in India",
"homestaysCount": 0,
"resortsCount": 0,
"price": 120,
"rent": 12,
"mortgage": 24
}
]
Loading