Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## uses crt; // работа с цветом
- var (b,r,g,y,m,c) := (' BB',' RR',' GG',' YY',' MM',' CC');
- //
- var auto_lst := new List<string>;
- auto_lst.Add(b);
- auto_lst.Add(r);
- auto_lst.Add(g);
- auto_lst.Add(y);
- auto_lst.Add(m);
- auto_lst.Add(c);
- auto_lst := auto_lst.Shuffle;
- auto_lst.RemoveAt(0);auto_lst.RemoveAt(0);
- //
- Println(auto_lst);
- Println('Вариант компьютера: ');
- // индекс 0
- if (auto_lst[0] = b)
- then
- begin
- TextBackground(crt.LightBlue);
- TextColor(crt.Black);
- Print(' BB');
- end
- else if (auto_lst[0] = r)
- then
- begin
- TextBackground(crt.LightRed);
- TextColor(crt.Black);
- Print(' RR');
- end
- else if (auto_lst[0] = g)
- then
- begin
- TextBackground(crt.LightGreen);
- TextColor(crt.Black);
- Print(' GG');
- end
- else if (auto_lst[0] = y)
- then
- begin
- TextBackground(crt.Yellow);
- TextColor(crt.Black);
- Print(' YY');
- end
- else if (auto_lst[0] = m)
- then
- begin
- TextBackground(crt.LightMagenta);
- TextColor(crt.Black);
- Print(' MM');
- end
- else if (auto_lst[0] = c)
- then
- begin
- TextBackground(crt.LightCyan);
- TextColor(crt.Black);
- Print(' CC');
- end;
- // индекс 1
- if (auto_lst[1] = b)
- then
- begin
- TextBackground(crt.LightBlue);
- TextColor(crt.Black);
- Print(' BB');
- end
- else if (auto_lst[1] = r)
- then
- begin
- TextBackground(crt.LightRed);
- TextColor(crt.Black);
- Print(' RR');
- end
- else if (auto_lst[1] = g)
- then
- begin
- TextBackground(crt.LightGreen);
- TextColor(crt.Black);
- Print(' GG');
- end
- else if (auto_lst[1] = y)
- then
- begin
- TextBackground(crt.Yellow);
- TextColor(crt.Black);
- Print(' YY');
- end
- else if (auto_lst[1] = m)
- then
- begin
- TextBackground(crt.LightMagenta);
- TextColor(crt.Black);
- Print(' MM');
- end
- else if (auto_lst[1] = c)
- then
- begin
- TextBackground(crt.LightCyan);
- TextColor(crt.Black);
- Print(' CC');
- end;
- // индекс 2
- if (auto_lst[2] = b)
- then
- begin
- TextBackground(crt.LightBlue);
- TextColor(crt.Black);
- Print(' BB');
- end
- else if (auto_lst[2] = r)
- then
- begin
- TextBackground(crt.LightRed);
- TextColor(crt.Black);
- Print(' RR');
- end
- else if (auto_lst[2] = g)
- then
- begin
- TextBackground(crt.LightGreen);
- TextColor(crt.Black);
- Print(' GG');
- end
- else if (auto_lst[2] = y)
- then
- begin
- TextBackground(crt.Yellow);
- TextColor(crt.Black);
- Print(' YY');
- end
- else if (auto_lst[2] = m)
- then
- begin
- TextBackground(crt.LightMagenta);
- TextColor(crt.Black);
- Print(' MM');
- end
- else if (auto_lst[2] = c)
- then
- begin
- TextBackground(crt.LightCyan);
- TextColor(crt.Black);
- Print(' CC');
- end;
- // индекс 3
- if (auto_lst[3] = b)
- then
- begin
- TextBackground(crt.LightBlue);
- TextColor(crt.Black);
- Print(' BB');
- end
- else if (auto_lst[3] = r)
- then
- begin
- TextBackground(crt.LightRed);
- TextColor(crt.Black);
- Print(' RR');
- end
- else if (auto_lst[3] = g)
- then
- begin
- TextBackground(crt.LightGreen);
- TextColor(crt.Black);
- Print(' GG');
- end
- else if (auto_lst[3] = y)
- then
- begin
- TextBackground(crt.Yellow);
- TextColor(crt.Black);
- Print(' YY');
- end
- else if (auto_lst[3] = m)
- then
- begin
- TextBackground(crt.LightMagenta);
- TextColor(crt.Black);
- Print(' MM');
- end
- else if (auto_lst[3] = c)
- then
- begin
- TextBackground(crt.LightCyan);
- TextColor(crt.Black);
- Print(' CC');
- end;
- readln()
Advertisement
Add Comment
Please, Sign In to add comment