Free Essay

Windows Vista

In: Computers and Technology

Submitted By AnastasiyaG
Words 3299
Pages 14
ФЕДЕРАЛЬНОЕ АГЕНСТВО ПО ОБРАЗОВАНИЮ РОССИЙСКОЙ ФЕДЕРАЦИИ

ФГБОУ ВПО ХАКАССКИЙ ГОСУДАРСТВЕННЫЙ УНИВЕРСИТЕТ ИМЕНИ Н.Ф КАТАНОВА ИНСТИТУТ ИНФОРМАЦИОННЫХ ТЕХНОЛОГИЙ И ИНЖЕНЕРНОГО ОБРАЗОВАНИЯ КАФЕДРА ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ВЫЧЕСЛИТЕЛЬНОЙ ТЕХНИКИ И АВТОМАТИЗИРОВАНЫХ СИСТЕМ

Оценка работы_______________

КУРСОВАЯ РАБОТА

По дисциплине «Программирование» ТЕМА: «Игровая программа Крестики-Нолики.»

Студент группы 24 Галеницкая А.А Руководитель, Доцент кафедры ПОВТиАС, К. ф. м. н. Санников Е.В.

Г. Абакан, 2015
Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования
«Хакасский государственный университет им. Н.Ф.Катанова»

Институт (факультет)_ИТиИО___________Кафедра____ПОВТиАС______________
Специальность (направление)___230700 Прикладная информатика_______________ УТВЕРЖДАЮ Зав.кафедрой________________ «_____»___________________________г.

ЗАДАНИЕ на выполнение курсовой работы
________________________________________________________________
(фамилия ,имя ,отчество)

1.Тема работы (проекта)________________________________________________________
__________________________________________________________________________________________Утверждена распоряжением по институту (факультету) от «___»___________ г. №____
2.Срок сдачи студентом законченной работы (проекта),______________________________
3.Исходные данные к работе (проекту)____________________________________________
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
4. Содержание расчетно-пояснительной записки (перечень подлежащих разработке вопросов)
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
5.Перечень иллюстрационного, графического материала (с точным указанием обязательных чертежей)
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________6. Использование новых информационных технологий:
- при оформлении работы ___________________________________________________________ - при подготовке иллюстрационного материала _________________________________________ - при презентации работы ___________________________________________________________
7. Консультанты по работе (проекту) (с указанием относящихся к ним разделов работы (проекта)
|Раздел |Ф.И.О. консультанта |Подпись |Дата |
| | | | |

8. Дата выдачи задания_________________Руководитель____________________ Санников Е.В. (подпись, фамилия и инициалы) Задание принял к исполнению________________________ (подпись)
Цель курсовой работы:

Закрепление полученных знаний по дисциплине «Программирования».

Задача курсовой работы:

• 1.Применение теоретических знаний по дисциплине «Программирования» и по темам, вынесенным на самостоятельное изучение, на практике для создания программного проекта, реализующего игру логического и (или) развлекательного характера.

• 2.Получение необходимых практических навыков прикладного программирования. • 3. Приобретение навыков алгоритмического мышления и работы с оформлением документации.

Аннотация.

«Крестики-нолики» - популярная игра людей всех возрастов. Она отличается простотой, способствует развитию внимания и элементарной логики. В данной работе эта игра реализована на языке PascalABC.

Содержание

Введение…………………………………………………….…………3

1. Основная часть

1.1. Системные требования…………………………….…….……6

1.2. Инструкция для пользователя……………………..…………6

1.3. Функциональная схема алгоритма……………….…….…….7

Описание процедур……………………………………….….…….8

Заключение…………………………………………………….…...11

Список использованной литературы…………………...…….…...12

2. Приложения

2.1. Код программы………………………………………….….….13

2.2. Демонстрация работы программы……………………...….…20

Введение

На данный момент существует великое множество компьютерных игр, так же разнообразны подходы в их создании.

Например, популярные в последнее время небольшие игры (чаще всего многопользовательские, через сеть Интернет) создаются по технологии Flash с использованием языка ActionScript. Такие игры крайне популярны на разнообразных развлекательных интернет-ресурсах и а социальных сетях.

Большие, сложные игры с реалистичной 3D графикой пишутся на C++, отдельные модули к ним могут быть написаны на других языках (например AI – «искусственный интеллект» - на Lisp). Вообще, язык для создания игры выбирается как компромисс между требованиями к игре, к компьютерному железу и к стоимости разработки.

На подавляющем большинстве мобильных телефонов установлены ARM процессоры. Поэтому игры для мобильных телефонов на платформе Java пишутся на специальном языке для мобильных телефонов MobileBasic, а также на диалекте языка Pascal – MIDletPascal.

Игры для коммуникаторов на базе ОС Windows 5/6 зачастую пишутся на языке Python.

Также существуют специальные программы для написания игр. Яркий пример – программа GameMaker, автором которой является Марк Овермас. Эта программа позволяет написать захватывающую игру даже без знания языков программирования!

Передо мной стояла цель написать небольшую игру с применением графики, и я выбрала язык Pascal.

1. Основная часть

1.1. Системные требования

Рекомендуемые системные требования:

CPU PI MMX 166MHz , RAM 64 Mb, Video S3 trioV2 1Mb, 1.5Мб свободного места на жестком диске.

Операционная система MS-DOS , FreeDOS, Caldera DR-DOS или любая другая с возможностью эмулирующая DOS.

1.2. Инструкция для пользователя

Что это за игра? Это – популярные «крестики нолики». Это игра между двумя противниками на поле размером 3х3 клетки. Один игрок играет «крестиками», другой – «ноликами». Игроки по очереди ставят свои символы в клетки игрового поля. Побеждает тот, кто первым заполнил своими символами три клетки подряд по вертикали, горизонтали или диагонали. Если свободные клетки поля закончились, но никто из игроков не одержал победы, то считают, что игра закончилась «ничьей».

Как играть? Игроки по очереди при помощи клавиш-«стрелок» выбирают нужную ячейку и при нажатии клавиши “Enter” устанавливают в ячейку свой символ.

Список файлов, необходимых для игры:

• GAME.EXE

• EGAVGA.BGI

Оба файла должны находиться в одной директории. Запуск игры происходит при открытии GAME.EXE. Сразу после запуска игры пользователь попадает на стартовую страницу игры, которая содержит информацию по игре, о разработчике, об управлении. После нажатия на любую клавишу начинается игра. Выход из игры возможен при нажатии на “Escape”.

1.3. Функциональная схема алгоритма

[pic]

Описание процедур

Процедура StartMenu.
Данная процедура выводит на экран начальное окно игры. Оно содержит: название и текущую версию игры, имена программиста-создателя и бета-тестера и инструкцию по игре. В этой процедуре используются стандартные процедуры: • SetTextStyle(шрифт,направление,размер_шрифта); - устанавливает стиль выводимого текста (библиотека GRAPH); • OutTextXY(x, y, S); - печатает строку S, начиная с позиции (x, y); (библиотека GRAPH); • SetColor(цвет); - выбирает цвет; (библиотека GRAPH);

Процедура Lattice.Данная процедура выводит на экран игровое поле: рамка + игровая решетка + заголовок, все желтого цвета. В этой процедуре используются стандартные функции и процедуры: • Line(x1, y1, x2, y2); - проводит линию из точки (x1, y1) в точку (x2, y2); (библиотека GRAPH); • SetTextStyle(шрифт,направление,размер_шрифта); - устанавливает стиль выводимого текста; (библиотека GRAPH); • OutTextXY(x, y, S); - печатает строку S, начиная с позиции (x, y); • SetColor(цвет); - выбирает цвет; (библиотека GRAPH);

ПроцедураManual.
Данная процедура выводит на экран (справа от игрового поля) инструкцию по игре. Набот стандартных процедур идентичен такому набору процедуры Lattice.

Процедура UpDown.
Данная процедура перемещает курсор в игровом поле по вертикали (вверх или вниз).
Входные данные: x, y:integer; – координаты текущего положения курсора.
Эта процедура вызывается при нажатии на клавиши «стрелки» («вверх» или «вниз»), и, в зависимости от нажатых клавиш, перемещает курсор вверх или вниз. Если курсор находится в самой верхней ячейке и нажата клавиша «вверх», то курсор перемещается в самую нижнюю ячейку этого же столбца.
В этой процедуре используются стандартная функция из библиотеки CRT – ReadKey, которая при нажатии на клавишу сразу присваивает значение переменной. Также, в ходе работы, эта процедура вызывает другую процедуру Rect, описанную ниже.
Процедура LeftRight.
Данная процедура идентична UpDown, разве что она перемещает курсор влево или вправо по игровому полю и вызывается из тела основной программы при нажатии клавиш «влево» или «вправо».

Процедура Rect(x,y,c:integer).
Данная процедура служит для вывода на экран квадратного курсора, с помощью которого можно перемещаться между ячейками игрового поля и фиксировать символ в нужной ячейке.
Входные данные: • x, y:integer; – координаты верхнего левого угла курсора, показывающие, куда его нужно переместить. • с:integer; – цвет курсора. Может принимать значения 15 (белый) и 0 (черный, для маскировки предыдущего положения курсора).
В этой процедуре были использованы следующие стандартные функции и процедуры: • SetColor(цвет); - выбирает цвет; (библиотека GRAPH); • Rectangle(x1, y1, x2, y2); - рисует прямоугольник по заданным координатам, (х1,у1) – верхний левый угол, (х2,у2) – нижний правый угол; (библиотека GRAPH);
Процедура Rect вызывается процедурами UpDown и LeftRight.

Процедура Symbol.
Данная процедура вызывается из основной программы после нажатия клавиши ENTER, когда курсор находится в нужной ячейке. Устанавливает необходимый символ с заданным цветом в выбранной ячейке.

Входные данные: • x,y:integer; - текущие координаты курсора. • zn:char; - символ для установки в ячейку, «Х» или «О». • clr:shortint; - цвет выводимого символа, синий для крестика и зеленый для нолика.
Используемые стандартнее функции и процедуры: • SetColor(цвет); - выбирает цвет; (библиотека GRAPH); • SetTextStyle(шрифт,направление,размер_шрифта); - устанавливает стиль выводимого текста; (библиотека GRAPH); • OutTextXY(x, y, S); - печатает строку S, начиная с позиции (x, y); (библиотека GRAPH);
После получения координат курсора данная функция с помощью оператора Case переходит от них к координатам символа и уже по ним устанавливает символ в игровом поле.

Процедура ExitMenu.
Эта процедура вызывается из тела главной программы после окончания игрового кона. Она выводит информационное окно с предложением выйти из игры, либо начать заново.
Используемые стандартные функции и процедуры: • Line(x1, y1, x2, y2); - проводит линию из точки (x1, y1) в точку (x2, y2); (библиотека GRAPH); • SetTextStyle(шрифт,направление,размер_шрифта); - устанавливает стиль выводимого текста; (библиотека GRAPH); • OutTextXY(x, y, S); - печатает строку S, начиная с позиции (x, y); • SetColor(цвет); - выбирает цвет; (библиотека GRAPH);
В теле основной программы сначала происходит инициализация графики. Затем в цикле с постусловием вызывается процедура StartMenu, она выполняется пока не нажата любая клавиша. После этого начинается еще один цикл с постусловием, который по сути является основным циклом игры. В нем задаются начальные координаты курсора, обнуляются элементы массива и начинается третий цикл с постусловием, который представляет из себя игровой кон. В этом цикле вначале определяется символ («Х» или «О») по четности переменной i. После этого вызываются процедуры Lattice и Manual, которые непрерывно находятся на экране до окончания игры. Затем по команде readkey; считывается с клавиатуры символ, и если это одна из клавиш-стрелок или клавиша Enter, то происходят соответствующие действия: «влево» или «вправо» - вызывается процедура LeftRight, «вверх» или «вниз» - процедура UpDown, «Enter» - вызывается процедура Symbol, и соответствующему элементу массива присваивается значение 1 или 2, в зависимости от текущего символа («Х» или «О»). После этого происходит проверка вариантов победы каждого из игроков или «ничьей». Цикл текущего игрового кона заканчивается после положительного результата одной из этих проверок, либо по нажатии клавиши “Escape”. В «основном цикле игры» в еще одном цикле с постусловием вызывается процедура ExitMenu; если нажат «Escape», то происходит выход из «основного» цикла с последующим завершением программы, если нажата любая другая клавиша, «основной » цикл начнется заново.

Заключение

Благодаря методу оценки эффективности хода была реализована игра «крестики-нолики». Анализ знаков ряда поля проводился с помощью оператора if. Эффективность хода, соответствует очередности выполнения алгоритма оценки соответствующей позиции, согласно представленному в краткой теории алгоритму.

Правильность работы программы была проверена в ходе экспериментальных игр с компьютером. Среди положительных сторон выполненной работы можно отметить:

• Красочный, дружелюбный и интуитивно понятный интерфейс.

• Использование курсора.

• Небольшой размер дистрибутива программы.

К недостаткам следует отнести отсутствие режима игры PvC (игрок против компьютера).

Список использованной литературы:

1. «Паскаль и Дельфи» А.Попов, М., 2004.

2. «Программирования на языках высокого уровня» Д.Страуструп, М. 2006.

3. «Учебник по Turbo Pascal 7» В.В. Зеленский, М. 2000.

4. Петцольд Ч. Программирование для Microsoft Windows на C#. — М.: Издательско-торговый дом «Русская Редакция», 2002.

5. Фролов А.В., Фролов Г.В. Графический интерфейс GDI в Microsoft Windows. — М.: «ДИАЛОГ-МИФИ», 1993. — (Библиотека системного программиста; Т. 14).

2. Приложение
2.1. Код программы
USES graphABC, crt; {подключение библиотек}
VAR gd,gm,x0,y0,i,k,j:integer; {Описание переменных. Целочисленный тип имеют: gd и gm – для инициализации графики, x0 и y0 – координаты курсора, i – для определения символа («крестик» или «нолик»), j и k – для использования в циклах-счетчиках } ch,zn:char; {Символьный тип имеют: ch – считываемый с клавиатуры символ, zn – передается “X” или “O” для отображения в ячейке игровой решетки} a:array[1..3,1..3] of shortint; {Массив, содержит данные в зависимости от заполненности ячеек. Его элементы принимают значения 0 (ячейка пуста), 1 (крестик) или 2 (нолик)} n,w,e,ctrl:shortint; {n – передает цвет для выводимого на игровом поле символа, 1 (синий) для крестика, 2 (зеленый) для нолика, w и e – для перехода от координат курсора к индексам массива, ctrl – контроль заполненности массива }
{Процедура вывода стартовой страницы.} procedure StartMenu; begin SetColor(15); {Все надписи на экране – белого цвета} SetTextStyle(0,0,3); OutTextXY(30,30,'TIC-TAK-TOE'); {Название игры} SetTextStyle(0,0,1); OutTextXY(320,45,'V. 1.1'); {Текущая версия} OutTextXY(20,110,'CREATOR: Protasov Nikolai.'); {Создатель игры} OutTextXY(20,130,'THANKS: Semyonov Dmitrij FOR BETA-TEST.'); {Благодарности} OutTextXY(20,180,'MANUAL:'); {Далее следует инструкция по игре} OutTextXY(40,200,'Use keys'); OutTextXY(60,220,'LEFT'); OutTextXY(115,220,chr(27)); OutTextXY(60,240,'RIGHT'); OutTextXY(115,240,chr(26)); OutTextXY(60,260,'UP'); OutTextXY(115,260,chr(24)); OutTextXY(60,280,'DOWN'); OutTextXY(115,280,chr(25)); OutTextXY(40,300,'for moving the cursor.'); OutTextXY(40,330,'Use ENTER for check your symbol.'); OutTextXY(60,380, 'PRESS ANY KEY TO START GAME'); end; {Процедура, выводящая информационное окно по окончании игры} procedure ExitMenu; begin setcolor(15); {Надписи и рамка – белого цвета} SetTextStyle(0,0,1); OutTextXY(20,330,'If you want to exit, press ''ESCAPE'''); OutTextXY(20,360,'If you want to restart game, press ANY KEY'); line(0,302,450,302); {Рамка} line(0,302,0,400); line(0,400,450,400); line(450,400,450,302); end; {Процедура, реализующая квадратный курсор на поле} procedure rect(x,y,c:integer); begin setcolor(c); {Цвет рамки, белый, либо черный (для маскировки)} rectangle(x,y,x+26,y+26); {Собственно, курсор} end; {Процедура, рисующая игровое поле: надпись, рамка и решетка} procedure Lattice; begin setcolor(14); {Игровое поле оформлено желтым цветом} line(80,80,80,170); {Решетка, состоящая из 4 линий} line(110,80,110,170); line(50,110,140,110); line(50,140,140,140); SetTextStyle(0,0,2); OutTextXY(20,30,'Let''s play!'); {Заглавная надпись} line(0,0,0,300); {Рамка} line(223,0,223,300); line(0,300,223,300); line(0,0,223,0); end; {Процедура, выводящая инструкцию по игре слева от игрового поля} procedure Manual; begin setcolor(4); {Все поле с инструкцией красного цвета} line(225,0,225,300); {Рамка} line(225,300,450,300); line(450,0,450,300); line(225,0,450,0); SetTextStyle(0,0,2); OutTextXY(240,30,'How to play'); {Заголовок} SetTextStyle(0,0,1); OutTextXY(290,80,'Use keys'); {Инструкция} OutTextXY(295,105,'LEFT'); OutTextXY(350,110,chr(27)); OutTextXY(295,125,'RIGHT'); OutTextXY(350,130,chr(26)); OutTextXY(295,145,'UP'); OutTextXY(350,150,chr(24)); OutTextXY(295,165,'DOWN'); OutTextXY(350,170,chr(25)); OutTextXY(245,190,'for moving the cursor.'); OutTextXY(290,230,'Use ENTER'); OutTextXY(250,250,'for check your symbol.'); end; {Процедура вывода в игровом поле символа «Х» или «О»} procedure Symbol(var x,y:integer;zn:char;clr:shortint); begin SetColor(clr); {Цвет символа, синий для крестика и зеленый для нолика} SetTextStyle(0,0,2); case x of {Выбор координат вывода символа в зависимости от координат курсора} 52: begin case y of 82: OutTextXY(60,90,zn); 112: OutTextXY(60,120,zn); 142: OutTextXY(60,150,zn); end; end; 82: begin case y of 82: OutTextXY(90,90,zn); 112: OutTextXY(90,120,zn); 142: OutTextXY(90,150,zn); end; end; 112: begin case y of 82: OutTextXY(120,90,zn); 112: OutTextXY(120,120,zn); 142: OutTextXY(120,150,zn); end; end; end; end;
{Процедура перемещения курсора вверх или вниз при нажатии на соответствующую клавишу}
Procedure UpDown(var x,y: integer); begin if ch=#0 then ch:=readkey; case ch of #72: begin rect(x,y,0); {Маскировка предыдущего положения курсора} if y=82 then y:=142 else y:=y-30; {Если курсор в самой верхней ячейке, то при нажатии клавиши «вниз», он переместится на самую нижнюю ячейку того же столбца} rect(x,y,15); {Курсор на новую позицию} end; #80: begin rect(x,y,0); {Маскировка предыдущего положения курсора} if y=142 then y:=82 else y:=y+30; {Если курсор в самой нижней ячейке, то при нажатии клавиши «вниз», он переместится на самую верхнюю ячейку того же столбца} rect(x,y,15); {Курсор на новую позицию} end; end; end; {Процедура перемещения курсора влево-вправо при нажатии соответствующих клавиш} procedure LeftRight(var x,y:integer); begin if ch=#0 then ch:=readkey; case ch of #75: begin rect(x,y,0); {Маскировка предыдущего положения курсора} if x=52 then x:=112 else x:=x-30; {Если курсор находится в крайней левой ячейке, то по нажатии «влево», он переместится в самую правую ячейку той же строки} rect(x,y,15); {Курсор на новой позиции} end; #77: begin rect(x,y,0); {Маскировка предыдущего положения курсора} if x=112 then x:=52 else x:=x+30; {Если курсор на крайней правой ячейке, то при нажатии «вправо» он смещается в крайнюю левую ячейку той же строки} rect(x,y,15); {курсор на новой позиции} end; end; end; {ТЕЛО ОСНОВНОЙ ПРОГРАММЫ}
BEGIN
gd:=vga; gm:=2; initgraph(gd,gm,''); {Инициализация графики} repeat StartMenu; {Вызывается процедура стартовой страницы до тех пор, пока не нажата любая клавиша} until keypressed;
REPEAT {Основной цикл игры. Выход из него – выход из всей программы, при нажатии на ESC}
ClearDevice; {Чистка экрана после стартовой страницы, а также при рестарте} x0:=52; y0:=82; {начальное положение курсора} i:=1; {Переменная, по четности-нечетности которой выбирается символ} for k:=1 to 3 do {Обнуление элементов массива} for j:=1 to 3 do a[k,j]:=0; repeat {Игровой кон} ctrl:=0; {Контроль заполненности массива нулями} {Выбор символа и цвета в зависимости от четности-нечетности переменной i.} if (i mod 2 = 1) then begin zn:='X'; n:=1; end {Нечетное – синий крестик} else begin zn:='O'; n:=2; end; {Четное – зеленый нолик}
Lattice; {Вызов процедуры, рисующей игровое поле}
Manual; {Вызов процедуры с инструкцией к игре} ch:=readkey; {Получение символа с клавиатуры} if (ord(ch)=72) or (ord(ch)=80) then UpDown(x0,y0); {Нажаты «вверх» или «вниз», вызывается соответствующая процедура} if (ord(ch)=75) or (ord(ch)=77) then LeftRight(x0,y0); {Нажаты «лево» или «право», вызывается соответствующая функция} case x0 of {Переход от координат курсора к индексам элементов массива} 52: begin case y0 of 82: begin w:=1; e:=1; end; 112: begin w:=1; e:=2; end; 142: begin w:=1; e:=3; end; end; end; 82: begin case y0 of 82: begin w:=2; e:=1; end; 112: begin w:=2; e:=2; end; 142: begin w:=2; e:=3; end; end; end; 112: begin case y0 of 82: begin w:=3; e:=1; end; 112: begin w:=3; e:=2; end; 142: begin w:=3; e:=3; end; end; end; end; if ord(ch)=13 then begin {При нажатии на ENTER в соответствующей ячейке появляется крестик или нолик } if a[w,e]=0 then begin a[w,e]:=n; inc(i); {увеличение i на 1} symbol(x0,y0,zn,n); end else continue; end; {Проверка условий победы для игрока с «крестиком»} if ((a[1,1]=1) and (a[1,2]=1) and (a[1,3]=1)) or ((a[2,1]=1) and (a[2,2]=1) and (a[2,3]=1)) or ((a[3,1]=1) and (a[3,2]=1) and (a[3,3]=1)) or ((a[1,1]=1) and (a[2,1]=1) and (a[3,1]=1)) or ((a[1,2]=1) and (a[2,2]=1) and (a[3,2]=1)) or ((a[1,3]=1) and (a[2,3]=1) and (a[3,3]=1)) or ((a[1,1]=1) and (a[2,2]=1) and (a[3,3]=1)) or ((a[3,1]=1) and (a[2,2]=1) and (a[1,3]=1)) then begin setcolor(1); {синий цвет} outtextxy(10,220,'Player X wins'); {Сообщение о победе} break; {заканчивается цикл игрового кона} end; {Проверка условий победы игрока с «ноликом»} if ((a[1,1]=2) and (a[1,2]=2) and (a[1,3]=2)) or ((a[2,1]=2) and (a[2,2]=2) and (a[2,3]=2)) or ((a[3,1]=2) and (a[3,2]=2) and (a[3,3]=2)) or ((a[1,1]=2) and (a[2,1]=2) and (a[3,1]=2)) or ((a[1,2]=2) and (a[2,2]=2) and (a[3,2]=2)) or ((a[1,3]=2) and (a[2,3]=2) and (a[3,3]=2)) or ((a[1,1]=2) and (a[2,2]=2) and (a[3,3]=2)) or ((a[3,1]=2) and (a[2,2]=2) and (a[1,3]=2)) then begin setcolor(2); {зеленый цвет}

outtextxy(10,220,'Player O wins'); {сообщение о победе} break; {заканчивается игровой кон} end;

for k:=1 to 3 do {Проверка наличия в массиве нулей} for j:=1 to 3 do if a[k,j]=0 then inc(ctrl); {если есть нули, увеличивается ctrl} if ctrl=0 then {Если же среди элементов массива нет нулей, но никто из игроков не одержал победу, значит «ничья»} begin setcolor(15); {Сообщение белым цветом} OutTextXY(20,220,'Drawn game!'); {Сообщение о «ничьей»} break; {Прекращение цикла игрового кона} end; until ord(ch)=27; {Игровой кон также может окончиться по нажатию на ESC}
ExitMenu; {Выводится постигровое сообщение} ch:=readkey; {считывается символ с клавиатуры}
UNTIL ord(ch)=27; {Если нажат ESC, то программа корректно завершится, если любой другой символ – начнется новый игровой кон} closegraph; END.

2.2. Демонстрация работы программы:

[pic]

[pic]

[pic]

Similar Documents

Premium Essay

Windows Vista

...-530, NEW PRODUCT DEVELOPMENT SEPTEMBER 17, 2014 WINDOWS VISTA PRODUCT AUTOPSY IMPETUS FOR DEVELOPMENT OF PRODUCT AND ITS PERFORMANCE Due to growing importance of graphics, user interface, usability of the operating system Microsoft has been working to develop a very good operating system for 6 years after they have released Windows XP. On January 2007, they have released windows Vista before the completely checking the security issues and interface issues that the operating system had. Windows Vista is an operating system by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs. Development was completed on November 8, 2006, and over the following three months, it was released in stages to computer hardware and software manufacturers, business customers and retail channels. On January 30, 2007, it was released worldwide and was made available for purchase and download from Microsoft's website. The release of Windows Vista came more than five years after the introduction of its predecessor, Windows XP, the longest time span between successive releases of Microsoft Windows desktop operating systems. New features of Windows Vista include an updated graphical user interface and visual style dubbed Aero, a new search component called Windows Search, redesigned networking, audio, print and display sub-systems, and new multimedia tools including Windows DVD Maker. Vista aimed to increase the level of communication between...

Words: 1302 - Pages: 6

Premium Essay

3 Security Features of Windows Vista

...3 Security Features of Windows Vista 3 Security Features of Windows Vista In this project I will cover Windows Defender, Windows Firewall and User Account Control. TASK #1 Windows Defender Surfing the internet is not safe anymore. You can visit a website and next thing you know you have received some virus just by accessing the website. You can purchase Malware and Spyware programs, but Microsoft has introduced Windows Defender in Vista. Defender is a built in program that comes with Windows Vista to keep spyware and other unwanted software from infecting your computer. It does this in 3 ways: * There is “Real-time protection” that alerts you when attempts to access your computer and install software are done. * There is “SpyNet” which is message board that people can look to see how others responded to software not yet classified for risks. Anyone can participate and post their comments on what they experienced with certain software programs. * Finally you can utilize the “Scanning” feature and have Windows Defender scan your computer for spyware and other unwanted software. Windows Firewall Back in 2001 when Windows XP was released, it included a limited firewall call “Internet Connection Firewall”. Because of compatibility issues and difficulty reaching the options for the program it was rarely used. Due to several Worms attacking users who didn’t have a firewall or didn’t use the difficult “Internet Connection Firewall”, Microsoft came back with...

Words: 846 - Pages: 4

Free Essay

Compare Windows 7 to Vista to Xp

...Compare Windows 7 to Vista to XP Cedric Green IT109 MS-Desktop operating System Instructor: Luis A. Barreiros Comparing Windows 7 to Vista to XP Microsoft Windows XP the XP is short for experience it was released to the world on October 25, 2001. When it was released it was the most highly anticipated operating system on the market. It was introduced in two styles Windows XP Home and Windows XP Professional. (1) “Most of the feature where the same in home and professional, but the difference was that Windows XP Professional edition incorporated various feature to support communications, mobility, as well as remote help and support. Some of the support feature for home was easy setup, auto-configuration connections options.” It came standard with Internet Explorer 6 as the default web browser. (1)Bill Gates said, “Simply put, Windows XP is the best operating System Microsoft has ever built.” (2) “It was built on the momentum of the internet and digital media with the improvements that increase productivity and provide both business and home users with an easy to use exciting PC experience.” Windows XP Professional could either be installed on a single pc or throughout a worldwide network because it was built on a common code base. Do to this may it more cost effective for the business users to own. (3) “It was the key operating system for Microsoft to Vista was released in 2006. One of XP’s remarkable claims to fame is that when buying a new computer with...

Words: 1912 - Pages: 8

Premium Essay

Comparing Windows Xp, Vista, and 2003 Server

...Comparing Windows XP, Vista, and 2003 Server Comparing Windows XP, Vista, and 2003 for Deployment in Riordan Manufacturing Introduction Riordan Manufacturing will require IT infrastructure upgrades in both server/workstation hardware as well as network and workstation operating systems in order to maintain a competitive edge in the market today. Current operating systems in use at Riordan will either not support or ineffectively utilize resources provided in newer hardware available for procurement. Transitioning to new infrastructure requires a detailed look at the applications required for business processes, the availability and pricing of upgraded software packages to replace current applications, and/or the feasibility of rewriting those applications for modern architectures. The upgrade plan should build as much backward compatibility for older applications as possible, while still maintaining progressive replacement cycles aiding in product support and reliability. Windows XP FEATURES Over the years Microsoft has produced many versions of Windows since 1985. Every version of Windows from 1985 to 1990’s can be considered as a testing phase until Windows 3.0 came out for personal computers. Windows XP Professional integrates the strengths of Windows 2000 Professional. Windows XP offers many enhancements and a reduced total cost of ownership over Windows 2000 while increasing your computer power. Windows XP Professional advanced management and support...

Words: 3011 - Pages: 13

Premium Essay

Windows 7

...COMPARISON OF FEATURES CHART Feature | Windows 7 Starter | Home Basic | Home Premium | Professional | Enterprise | Ultimate | Aero User Interface | No | Partial | Yes | Yes | Yes | Yes | Bitlocker Drive Encryption | No | No | No | No | Yes | Yes | Complete PC Backup | | | | | | | Desktop Deployment Tools | | | | | | | Dual Processor Support (not counting Processor Cores) | | | | | | | Encrypting File System | No | No | No | Yes | Yes | Yes | File and Printer Sharing Connections | ? | 5 | 10 | 10 | 10 | 10 | Network Access Protection Client | | | | | | | Network & Sharing Center | No | Yes | Yes | Yes | Yes | Yes | Parental Controls | No | Yes | Yes | Yes | Yes | Yes | Policy-Based Quality of Service for Networking | | | | | | | Scheduled Backups | | | | | | | Software Assurance, available under | | | | | | | Subsystem for UNIX-based applications | No | No | No | No | Yes | Yes | Tablet PC | | | | | | | User Interface multiple language installs | No | No | No | No | Yes | Yes | Volume Licensing Keys | No | No | No | Yes | Yes | No | Virtual Machine Licenses (4) | | | | | | | Windows fax and Scan | | | | | | | Windows Media Center | No | No | Yes | Yes | Yes | Yes | Wireless Network Provisioning | | | | | | | Upgrade compatibility There are two possible ways to upgrade to Windows 7 from an earlier version of Windows: * An in-place install (labeled "Upgrade" in...

Words: 479 - Pages: 2

Premium Essay

Broadman Upgrade

...Boardman Software analysis This analysis is to address the software upgrade between all of Boardman’s locations. Boardman is comprised of three hotels, a convention center, four restaurants, two gift shops, a pro shop, and a spa. Each location operates independently of the other locations. However, all locations are managed by Boardman Management Group (BMG). Each location has different software and BMG would like to have a consistent way of communication and sharing documents between all locations. Smith Systems Consulting can solve and correct the issue of different software at different locations in the following way; 1. Provide a consistent software recommendation for all locations 2. Provide basic system requirements for the software upgrades 3. Provide direction on how all software can be implemented at the different locations. Consistent Software First, to address the issue of different software and different operating systems; it is important to have a consistent product installed at all locations. This will allow for easy transfer of documents between locations. There is no need to upgrade the operating systems at all locations if you use the same word software at all locations. It is important to have the same word software for compatibility issues. This can be addressed with a Microsoft Office software upgrade such as Office 2007 or 2010. Microsoft Office has the ability to save documents in older form to allow for compatibility with the newer versions...

Words: 850 - Pages: 4

Free Essay

Helllooooooooo

...What Is Print Management? The Print Management snap-in is available in the Administrative Tools folder on computers running Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate and Windows Server 2008. You can use it to install, view, and manage all of the printers and Windows print servers in your organization. Print Management provides current details about the status of printers and print servers on the network. You can use Print Management to install printer connections to a group of client computers simultaneously and to monitor print queues remotely. Print Management can help you find printers that have an error condition by using filters. It can also send e-mail notifications or run scripts when a printer or print server needs attention. On printers that provide a Web-based management interface, Print Management can display more data, such as toner and paper levels. Who Should Use Print Management? This guide is targeted at the following audiences: • Print Administrators and Help Desk professionals.
 • Information Technology (IT) planners and analysts who are evaluating the product.
 Enterprise IT planners and designers.
 Benefits of Print Management Print Management saves the print administrator a significant amount of time installing printers on client computers and managing and monitoring printers. Tasks that can require up to 10 steps on individual computers now can be accomplished in 2 or 3 steps on multiple computers simultaneously and...

Words: 1185 - Pages: 5

Free Essay

Candy

...BitLocker To Go – USB Flash Drive encryption – User Guide Introduction BitLocker To Go is a new feature of Windows 7 which allows encryption of easily misplaced portable storage devices such as USB Flash Drives and external hard drives. Encryption is a way to enhance the security of a message or file by scrambling the contents so that it can be read only by someone who has the right encryption key (password) to unscramble it. Encryption is used when you want a strong level of protection for your information. With the increase in the use of very small, large capacity USB flash drives the potential for sensitive data to be lost or stolen has become more of a concern. BitLocker allows you to encrypt a USB flash drive/external hard drive and restrict access with a password. Without the password, the USB drive is inaccessible. When you connect a BitLocker encrypted USB drive to a Windows 7 computer you will be prompted for a password, after entering the password correctly you can read and write to the drive as normal. Turning on BitLocker To Go on a USB Flash drive on Windows 7 • First open up My Computer and Right-click on the flash drive you want to encrypt and select Turn on BitLocker. • BitLocker will then initialise the drive. A window will be displayed as follows: • After BitLocker initializes the flash drive you will be asked to choose how you want to unlock the drive. Select the first option: Use a password to unlock the drive. As detailed passwords...

Words: 1141 - Pages: 5

Premium Essay

334rrtty

...Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. This guide is provided for information purposes only. All information included herein is subject to change without notice. Samsung Electronics is not responsible for any direct or indirect damages, arising from or related to use of this guide. • • • • • • • • Samsung and Samsung logo are trademarks of Samsung Electronics Co., Ltd. PCL and PCL 6 are trademarks of Hewlett-Packard Company. Microsoft, Internet Explore, Windows, Windows Vista, Windows 7 and Windows 2008 Server R2 either registered trademarks or trademarks of Microsoft Corporation. PostScript 3 is a trademark of Adobe System, Inc. UFST® and MicroType™ are registered trademarks of Monotype Imaging Inc. TrueType, Mac and Mac OS are trademarks of Apple Inc., registered in the U.S and other countries. LaserWriter is a trademark of Apple Inc. All other brand or product names are trademarks of their respective companies or organizations. Copyright_ 1 Contents ABOUT THIS INSTALLATION GUIDE Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Finding more information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 SETTING UP THE HARDWARE Installation environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Machine configuration . . . . . . . . . . . . . . . . . . . . . . . . . ....

Words: 8195 - Pages: 33

Premium Essay

Common Problems in Ms Word

...Method 1: Check for strange behavior Many damaged documents exhibit strange behavior. This behavior may be related to damage to the document or to the template on which the document is based. This behavior may include the following: Repeatedly renumbers the existing pages in the document Repeatedly redoes the page breaks in the document Incorrect document layout and formatting Unreadable characters on the screen Error messages during processing A computer that stops responding when you open the file Any other unexpected behavior that cannot be attributed to the typical operation of the program If the document shows any of these symptoms, or if you cannot open the document, go to method 2. Back to the top Method 2: Check other documents and programs Sometimes, this behavior may be caused by factors other than document damage. To eliminate these other factors, follow these steps: Look for similar behavior in other documents. Look for similar behavior in other 2007 Microsoft Office programs or 2010 Microsoft Office programs. If any of these steps indicate that the problem is not in the document, you will then have to troubleshoot Word 2007 or Word 2010, the 2007 Office suite, the 2010 Office suite, or the operating system that is running on the computer. Back to the top Troubleshooting steps to try if you can open the damaged document Method 1: Change the template that is used by the document Step 1: Determine the template...

Words: 3477 - Pages: 14

Free Essay

Life

...What Is Print Management? The Print Management snap-in is available in the Administrative Tools folder on computers running Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate and Windows Server 2008. You can use it to install, view, and manage all of the printers and Windows print servers in your organization. Print Management provides current details about the status of printers and print servers on the network. You can use Print Management to install printer connections to a group of client computers simultaneously and to monitor print queues remotely. Print Management can help you find printers that have an error condition by using filters. It can also send e-mail notifications or run scripts when a printer or print server needs attention. On printers that provide a Web-based management interface, Print Management can display more data, such as toner and paper levels. Who Should Use Print Management? This guide is targeted at the following audiences: * Print Administrators and Help Desk professionals.
 * Information Technology (IT) planners and analysts who are evaluating the product.
 Enterprise IT planners and designers.
 Benefits of Print Management Print Management saves the print administrator a significant amount of time installing printers on client computers and managing and monitoring printers. Tasks that can require up to 10 steps on individual computers now can be accomplished in 2 or 3 steps on multiple computers simultaneously...

Words: 1185 - Pages: 5

Premium Essay

Lab Network+

...Lesson 2 Lab Worksheet Lab Exercises Lab 1 How TCP/IP Protocols Work through the TCP/IP Model The purpose of this lab is to familiarize the students with the TCP/IP Model and some of the protocols that are used in it. This lab is important to the student because it takes the student through a thought experiment about how data would pass thorough the TCP/IP Model down from the computer and up through the destination computer. By doing this thought experiment the student will come to better understand how different protocols work together to accomplish a specific task. Materials • Word processing document • Textbook Do the Lab Follow Protocols through the Layers of the TCP/IP Model 1. Read though the section of this lesson titled “How the Layers Work Together.” 2. Carefully study Figure 2-11. [pic] 3. In a word processing document, list the layers of the TCP/IP Model and then the protocols that the discussion you read says are used on each layer to move the data from one location on the network to another. The following is what your answer should look like: • Application layer: HTTP • Transport layer: TCP • Internet layer: IP • Network Interface layer: Ethernet 4. List the protocols as they correspond to the TCP/IP Model...

Words: 791 - Pages: 4

Free Essay

Technology Emergence Papaer

...Technology Relationships Paper Brenda Ferguson-Calloway CMGT/557 – Emerging Technologies & Issues November 12, 2012 Ken Orgill Technology Relationships Paper What is leading edge technology? Leading edge technology is “In the 1960s & 70s, leading edge was 3GL languages such as COBOL, Fortran, etc. In the 1980s, 4GLs such as Progress and Informix emerged. In the 1990s, terms such as COM object and 32 bit relational databases were coined” (Pratico, 2008). Since the new millennium began, we have been hearing about HTML, NET and other web languages. What is bleeding edge technology? Bleeding edge technology is “a high-tech product that is so new that its place in the market is still uncertain. The term is applied to products that present a high level of risk because there is some question about how widely they will be accepted” (Web Finance, Inc., 2012). Bleeding technology is relatively, new technology. Bleeding technology is unreliable because it has not been tested and it has not proven its worthiness or authenticity. A user will be taking a huge risk to use the bleeding technology which would be more expensive than the leading technology. Bleeding edge technology could be very costly and it could turn into something that could be the beginning of a serious problem. The reason why bleeding edge technology could cause many problems is because it is new and might be quite risky because of the instability. Bleeding edge technology has not been thoroughly tested and...

Words: 1786 - Pages: 8

Free Essay

Groupe Policy in a Multi-Os Environment

...An important improvement that was added in Windows Vista was the removable media policies. It allowed for the use of USB drives, flash memory cards, external USB hard drives, and CD/DVD writers. These however posed a huge security problem for companies because it allowed the users to easily copy data from their systems, or even place unwanted viruses or malware onto their network. This lead to a lot of companies removing or just destroying these devices so that they wouldn’t work on their workstations. Vista also addressed the power management settings that weren’t available by default in Windows operation systems beforehand. There were third party software that was used before this release, but companies would prefer if it were built into Windows to reduce costs. Power management policies allowed the companies to save money on electricity, and run at lower temperatures. Hard disk settings were added which allowed the hard drive to be set to turn on or off at specific times. For example when the computer is on battery power, then the hard drive would power down. The other policy that was added for this is for when the computer is plugged in. These allowed for set time values to be set after inactivity or other events happen which would power down the hard drives. There were also settings for the displays which worked the same way as the hard drives. A very useful policy that is called “Require a password when a computer wakes” was added. This made it easier for companies...

Words: 346 - Pages: 2

Premium Essay

Healthcare

...Installing SensIt, RiskSim, and TreePlan 3 3.1 INSTALLATION OVERVIEW SensIt, RiskSim, and TreePlan are decision analysis add-ins for Microsoft Excel 2000–2010 (Windows) and Microsoft Excel 2004 & 2011 (Macintosh). In general, an Excel add-in is software that adds features to Excel. SensIt performs sensitivity analysis on your worksheet what-if model and automatically creates simple plots, spider charts, and tornado charts. Sensitivity analysis can help you determine which of your input assumptions are critical. RiskSim provides random number generator functions for model inputs, automates Monte Carlo simulation, and creates Excel charts for a histogram and the cumulative distribution of the output variable. TreePlan helps you build decision tree diagrams. These instructions are appropriate for installing any or all three of these products. For each add-in, all of the functionality, including its built-in help, is a part of the single file in XLA format. There is no separate help file. On a Windows computer, the installation does not create Windows Registry entries, although Excel may use such entries to keep track of its add-ins. 3.2 REMOVING PREVIOUS VERSIONS Before you open or install an add-in, you must remove any previous versions of the add-in. Excel will not work correctly if you try to use two versions of the same add-in simultaneously. For example, if you were using a tryout version and now you want to use the standard version, Excel will regard this as two...

Words: 3477 - Pages: 14