# Fruits Wars Complete Board Game Template Unity Asset

- Link: https://saguiitay.com/unity/fruits-wars-complete-board-game-template/
- Published: 2018-06-07T18:48:17+03:00
- Author: Itay

## Overview

[Fruits Wars Complete Board Game Template](https://assetstore.unity.com/packages/slug/104833?aid=1101lS3S)
is a complete board game template, ready to be published. Outsmart, outwit and expand
your control of the board. Play in a fast-pacing turn-based strategy board game,
against a friend or against the AI.

### Features

 * Multiple board sizes
 * Play against another player, or against an AI
 * Multiple difficulties AI implementation
 * Google Play integration for Achievements
 * Cute graphics and animations

Note: You need to install the following packages in order to view/test the package:
[GooglePlayGames](https://github.com/playgameservices/play-games-plugin-for-unity)
package.

**[Purchase the Fruits Wars Complete Board Game Template from the Unity Assets Store here >>](https://assetstore.unity.com/packages/slug/104833?aid=1101lS3S)**

## Screenshots

![Fruits Wars Complete Board Game Template Screenshot 1](https://i0.wp.com/www.saguiitay.
com/wp-content/uploads/Screenshot1-16-1024x576.png?ssl=1 "Fruits Wars Complete Board
Game Template Unity Asset 1")

![Fruits Wars Complete Board Game Template Screenshot 2](https://i0.wp.com/www.saguiitay.
com/wp-content/uploads/Screenshot2-16-1024x576.png?ssl=1 "Fruits Wars Complete Board
Game Template Unity Asset 2")

![Fruits Wars Complete Board Game Template Screenshot 3](https://i0.wp.com/www.saguiitay.
com/wp-content/uploads/Screenshot3-16-1024x576.png?ssl=1 "Fruits Wars Complete Board
Game Template Unity Asset 3")

![Fruits Wars Complete Board Game Template Screenshot 4](https://i0.wp.com/www.saguiitay.
com/wp-content/uploads/Screenshot4-10-1024x576.png?ssl=1 "Fruits Wars Complete Board
Game Template Unity Asset 4")

## Documentation

### User Interface

 * AdsController.cs – Utility class to display Google AdMobs Ads
 * ButtonSound.cs – Utility class to play a sound when a button is pressed.
 * Map.cs – Responsible for displaying the game board
 * MenuManager.cs – Manager for the main menu
 * NavigationManager.cs – Utility class to navigate between scenes
 * QuitOnBack.cs – Utility class to respond to the device’s back button
 * SoundsManager.cs – Utility class to play sounds

### Game State Management

 * Cell.cs – represents a single cell in the game board
 * CellExtension.cs – Extension methods for Cell
 * GameManager.cs – Main game manager, that controls the players’ selection, the
   flow of the game, invoke the AI, and checks the winning player.
 * GameMode.cs – Utility class used to retrieve objects based on the player’s selection

### Artificial Intelligence

 * ABPruning.cs – Implementation of the A/B pruning algorithm (see [Alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning)
   for details). The implementation allows selecting how many steps ahead the AI
   should check. It also allows “dumbing” down the AI by forcing it to select a 
   random move between the best moves.
 * Board.cs – Represent the game board in a more memory efficient way (using array
   of bytes)
 * Move.cs – Represent a possible game move

### Google Play integration

 * GPGSIds.cs – Id of the Google Play achievements
 * Social.cs – Utility class to handle Google Play signin and UI
 * SocialManager.cs – Utility class to manage Google Play high scores and achievements

### Utilities

 * Pool.cs – object pooling implementation in order to reduce memory usage (used
   by the AI)
 * RateApp.cs – Utility class to open the game’s page in the Google Play Store
 * ShareApp.cs – Utility class to share link of the game’s Google Play Store.
