Исправил отступы в коде прощающей стратегии
This commit is contained in:
@@ -369,13 +369,13 @@
|
||||
\begin{lstlisting}[caption={Код функции, реализующей прощающую стратегию.}, label={lst:forgivingStrategy}]
|
||||
forgivingStrategy :: [Char] -> [Char] -> Int -> [Char]
|
||||
forgivingStrategy opponentMoves generatedMoves n
|
||||
| n > 100 || length opponentMoves == 1 = generatedMoves
|
||||
| n == 0
|
||||
= forgivingStrategy opponentMoves (generatedMoves ++ ['С']) (n + 1)
|
||||
| head opponentMoves == 'С'
|
||||
= forgivingStrategy (tail opponentMoves) (generatedMoves ++ ['С']) (n + 1)
|
||||
| otherwise
|
||||
= forgivingStrategy (tail opponentMoves) (generatedMoves ++ ['П']) (n + 1)
|
||||
| n > 100 || length opponentMoves == 1 = generatedMoves
|
||||
| n == 0
|
||||
= forgivingStrategy opponentMoves (generatedMoves ++ ['С']) (n + 1)
|
||||
| head opponentMoves == 'С'
|
||||
= forgivingStrategy (tail opponentMoves) (generatedMoves ++ ['С']) (n + 1)
|
||||
| otherwise
|
||||
= forgivingStrategy (tail opponentMoves) (generatedMoves ++ ['П']) (n + 1)
|
||||
\end{lstlisting}
|
||||
|
||||
\subsubsection{Подсчёт очков}
|
||||
|
||||
Reference in New Issue
Block a user