Devam Ediyor

School project c++

On fox hunting are often several hunting dogs chasing a fox . In this project

we make a program that simulates the fox hunting in an area that looks like

chess board, ie area is divided into rectangular tiles . In each iteration , both the

fox and hounds moved in one of eight adjacent squares , ie if

the fox is on the field ( 4.7 ) it can go on any of the fields

( 3,6 ) , ( 3,7 ) , ( 3,8 ) , ( 4,8 ) , ( 5,8 ) , (5,7 ) , ( 5,6) , ( 4,6 ) in the next step . The fox always choose

on a field that moves far from the hunting dog that is closest to him .

Hounds can be moved in the same way as the fox , and always choose the field that

closest solids. Distances are calculated as the crow flies distance, ie with

Pythagoras . If there is a tie between the boxes you can hire any field

adopted. The goal of the fox to come off the board while targets

hunting dogs is to achieve solids before he gets away . There may be more than

a hunting dog in the same field . The fox starts to move , then move the dogs themselves .

The content of the program is as follows. First, there are two numbers . The first number indicates the

the size of the table, ie how many blocks are in each row and each column

(this is the nxn board) and the second number is the number of the Sporting . Thereafter

establish pairs of numbers , the first pair indicates the location fox ( (x , y ) coordinates ), and

so bring pairs of numbers that indicate the location of hunting dogs ( (x , y ) coordinates

for each hunting dog.

The program itself iterations through the game and find out if the fox gets out in a timely

time , or whether the hounds catch him. If the fox escaping from the board to

print "Escape ! " but another to print " Caught " .

Since we do not know in advance how many hounds are then

require the use of liquid matrix in this example . It is not necessary to print

the table itself and the situation but it is very likely that it will help to debugga

the program .

Beceriler: C++ Programlama

Daha fazlasını görün: programming board game, pair programming, matrix programming, hounds hire, goal programming example, gets programming, find pair programming, cplusplus school, chess programming hire, chasing, time school table, project matrix, chess programming, chess board moves program, programming project school, chess game project, programming school, chess board game, school time table, chess move, distance table, distance project, distance matrix, matrix board, time table school

İşveren Hakkında:
( 19 değerlendirme ) Hafnarfjörður, Iceland

Proje NO: #6561311



A proposal has not yet been provided

1 gün içinde 30$ USD
(128 Değerlendirme)

1 freelancer bu iş için ortalamada 30$ teklif veriyor


A proposal has not yet been provided

in 3 gün içinde166$ USD
(0 Değerlendirme)