Игра "Балда" с поддержкой работы по сети - Курсовая работа

бесплатно 0
4.5 72
Общие сведения об игре "Балда", обзор ее аналогов и основные требования, предъявляемые к данному программному продукту. Состав и параметры технических средств, оценка параметров совместимости. Основные классы приложения и их общая характеристика.

Скачать работу Скачать уникальную работу

Чтобы скачать работу, Вы должны пройти проверку:


Аннотация к работе
программный приложение игра балда Сетевые игры (игры с сетевой структурой) являются разделом теории игр, который изучает как методы формирования связей между игроками в конфликтно-управляемых системах, так и правила определения выигрышей игроков с учётом этих связей. «Балда» - лингвистическая настольная игра для 2-4 игроков, в которой необходимо составлять слова с помощью букв, добавляемых определённым образом на квадратное игровое поле. Класс TcpClient запрашивает данные из ресурса в интернете по протоколу TCP. Режим доступа: Приложение Листинг класса NegotiationManager. using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using BaldaClient.DisplayLogic; using BaldaClient.NetworkManagment; using BaldaClient.SettingsManagment; using BaldaGameLogic.Delegates; using BaldaGameLogic.GameLogic; using BaldaGameLogic.GameModel; namespace BaldaClient.Negotiation { public class NegotiationManager { #region GameManagment private GameLogicManager gameLogicManager; private DisplayManager displayManager; private NetworkManager networkManager; public SettingsManager SettingsManager { get; set; } public GameLogicControls GameLogicControls { get; set; } public bool IsProcessServer { get; set; } public BaldaAplicationForm MainForm { get; set; } public String ProcessUserName { get; set; } private LogicCell previousLogicCell; #endregion #region GameLogicFlags public bool IsCellSelectionExpected { get { return gameLogicManager.IsCellSelectionExpected; } set { gameLogicManager.IsCellSelectionExpected = value; } } public bool IsLetterSelectionExpected { get { return gameLogicManager.IsLetterSelectionExpected; } set { gameLogicManager.IsLetterSelectionExpected = value; } } public bool IsWordSelectionExpected { get { return gameLogicManager.IsWordSelectionExpected; } set { gameLogicManager.IsWordSelectionExpected = value; } } public bool IsSelectedNetworkGameMode { get { return gameLogicManager.IsSelectedNetworkGameMode; } set { gameLogicManager.IsSelectedNetworkGameMode = value; } } #endregion public List Players { get { return gameLogicManager.Players; } set { gameLogicManager.Players = value; } } public List TempPlayerList { get; set; } public NegotiationManager(BaldaAplicationForm mainForm) { MainForm = mainForm; gameLogicManager = new GameLogicManager(); networkManager = new NetworkManager(this); } public void AddPlayerToTempPlayerList(String userName) { if (TempPlayerList == null) { TempPlayerList = new List(); } if (TempPlayerList.FirstOrDefault(pl => pl.Name == userName) == null) { var number = TempPlayerList.Count 1; TempPlayerList.Add(new Player{Name = userName,Number = number}); } if (gameLogicManager.Settings.PlayerCount == TempPlayerList.Count) { gameLogicManager.Players = TempPlayerList; MainForm.CreateAllPlayersNameControls(); } } private void BindGameManagers() { gameLogicManager.DisplayCells = displayManager.DisplayCells; gameLogicManager.DisplayCellAsLight = displayManager.DisplayCellsAsLight; gameLogicManager.DisplayCurrentWord = displayManager.DispalyCurrentWord; gameLogicManager.DisplayCurrentPlayerName = displayManager.DisplayCurrentPlayerName; gameLogicManager.DisplayCurrentGuide = displayManager.DisplayCurrentGuide; gameLogicManager.DisplayCurrentError = displayManager.DisplayCurrentError; gameLogicManager.AddWordConfirmationButtons = GameLogicControls.GameForm.CreateWordConfirmationLabels; gameLogicManager.RemoveConfirmationLabels = GameLogicControls.GameForm.RemoveConfirmationLabels; gameLogicManager.AddLetterConfirmationButtons = GameLogicControls.GameForm.AddLetterConfirmationLabels; } public void ConfigureGame() { ConfigureGameSettings(); gameLogicManager.CreateGameLogicObjects(); } public void ConfigureGameSettings() { gameLogicManager.Settings = SettingsManager.GameLogicSettings; } public void StartGame() { gameLogicManager.StartGame(); displayManager.DrawFullMatrix(); SetFirstWord(БАЛДА); } private void SetFirstWord(string word) { gameLogicManager.SetFirstWord(word); } public void TrySelectCell(int xCor, int yCor) { var logicCell = displayManager.GetLogicCellByCor(xCor, yCor); if (logicCell!= null) { if (gameLogicManager.TrySelectCellForInsertingLetter(logicCell)) { IsLetterSelectionExpected = true; IsCellSelectionExpected = false; } } } public void SetLetterToCell(string letter) { if (gameLogicManager.LetterIsValidForInserting(letter)) { gameLogicManager.SetLetterToCell(letter); } } public void TryAddNextCellToWordSelection(int xCor, int yCor) { var logicCell = displayManager.GetLogicCellByCor(xCor, yCor); if (logicCell!= null && previousLogicCell!= logicCell) { previousLogicCell = logicCell; if (gameLogicManager.IsLogicCellValidForWordSelection(logicCell)) { gameLogicManager.AddCellToWordSelection(logicCell); } } } public void StopWordSelection() { gameLogicManager.StopWordSelection(); } public void ConfigureDisplaySettings() { displayManager = new DisplayManager(GameLogicC

Вы можете ЗАГРУЗИТЬ и ПОВЫСИТЬ уникальность
своей работы


Новые загруженные работы

Дисциплины научных работ





Хотите, перезвоним вам?