A console-based cricket simulator game written in Kotlin.
This project is a simple cricket simulator game implemented in Kotlin. It allows users to experience a basic cricket match simulation in the console.
- Simulates a cricket match with two innings.
- Tracks scores and wickets for each team.
- Basic player attributes such as batting skill and bowling accuracy.
- Randomized outcomes for ball deliveries.
- Supports customization for the number of overs per inning and players per team.
- Kotlin installed on your machine.
-
Clone the repository:
git clone https://github.com/your-username/cricket-simulator.git
-
Navigate to the project directory:
cd cricket-simulator
-
Run the game:
kotlin -cp . MainKt
This will start the cricket simulator.
- The game simulates a cricket match with two innings.
- Players score runs based on randomized outcomes for ball deliveries.
- Players may get out based on their batting skill.
- The team with the highest total score wins the match.
You can customize the game by adjusting the following parameters:
- Number of overs per inning: Modify the
oversPerInning
parameter in theCricketGame
class. - Number of players per team: Modify the
playersPerTeam
parameter in theCricketGame
class. - Player attributes: Adjust batting skill, bowling accuracy, and player types in the
Player
class.
Contributions are welcome! If you have ideas for improvements or find bugs, feel free to open an issue or submit a pull request.
- Ramkumar Velmurugan - Portfolio
Copyright 2023 Ramkumar Velmurugan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.