ΠΠ³ΡΠ° Β«ΠΠ°Π»Π΄Π°Β» Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠΎΠΉ ΡΠ°Π±ΠΎΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ
Π ΠΊΠΎΠΎΠΏΠ΅ΡΠ°ΡΠΈΠ²Π½ΠΎΠΌ Π²Π°ΡΠΈΠ°Π½ΡΠ΅ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΠΈΠ³ΡΡ ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠΎΠΉ ΡΠ²Π»ΡΠ΅ΡΡΡ Π²ΡΠ±ΠΎΡ ΠΏΡΠ°Π²ΠΈΠ»Π° ΡΠ°ΡΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ ΡΡΠΌΠΌΠ°ΡΠ½ΠΎΠ³ΠΎ Π²ΡΠΈΠ³ΡΡΡΠ° ΠΈΠ³ΡΠΎΠΊΠΎΠ² ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΎΠ±ΠΎΠΉ ΠΏΡΠΈ Π½Π΅ΠΊΠΎΡΠΎΡΠΎΠΉ Π½Π°ΠΏΠ΅ΡΠ΅Π΄ Π·Π°Π΄Π°Π½Π½ΠΎΠΉ ΠΈΠ»ΠΈ ΡΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ ΡΠ°ΠΌΠΈΠΌΠΈ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΡΡΡΠΊΡΡΡΠ΅. Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· ΡΠ°ΠΊΠΈΡ ΠΏΡΠ°Π²ΠΈΠ» ΡΠ°ΡΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ°ΡΡΠΌΠΎΡΡΠ΅ΡΡ Π²Π΅ΠΊΡΠΎΡ Π¨Π΅ΠΏΠ»ΠΈ (ΠΊΠ»Π°ΡΡΠΈΡΠ΅ΡΠΊΠΎΠ΅ ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ ΡΠ΅ΠΎΡΠΈΠΈ ΠΊΠΎΠΎΠΏΠ΅ΡΠ°ΡΠΈΠ²Π½ΡΡ ΠΈΠ³Ρ), ΠΏΠΎΡΡΡΠΎΠ΅Π½Π½ΡΠΉ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ Ρ ΡΡΡΡΠΎΠΌ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ… Π§ΠΈΡΠ°ΡΡ Π΅ΡΡ >
ΠΠ³ΡΠ° Β«ΠΠ°Π»Π΄Π°Β» Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠΎΠΉ ΡΠ°Π±ΠΎΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ (ΡΠ΅ΡΠ΅ΡΠ°Ρ, ΠΊΡΡΡΠΎΠ²Π°Ρ, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ)
ΠΠ³ΡΠ° «ΠΠ°Π»Π΄Π°» Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠΎΠΉ ΡΠ°Π±ΠΎΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ
ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΡΠΉ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΈΠ³ΡΠ° Π±Π°Π»Π΄Π°
Π‘Π΅ΡΠ΅Π²ΡΠ΅ ΠΈΠ³ΡΡ (ΠΈΠ³ΡΡ Ρ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΡΡΡΠΊΡΡΡΠΎΠΉ) ΡΠ²Π»ΡΡΡΡΡ ΡΠ°Π·Π΄Π΅Π»ΠΎΠΌ ΡΠ΅ΠΎΡΠΈΠΈ ΠΈΠ³Ρ, ΠΊΠΎΡΠΎΡΡΠΉ ΠΈΠ·ΡΡΠ°Π΅Ρ ΠΊΠ°ΠΊ ΠΌΠ΅ΡΠΎΠ΄Ρ ΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΠ²ΡΠ·Π΅ΠΉ ΠΌΠ΅ΠΆΠ΄Ρ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ Π² ΠΊΠΎΠ½ΡΠ»ΠΈΠΊΡΠ½ΠΎ-ΡΠΏΡΠ°Π²Π»ΡΠ΅ΠΌΡΡ ΡΠΈΡΡΠ΅ΠΌΠ°Ρ , ΡΠ°ΠΊ ΠΈ ΠΏΡΠ°Π²ΠΈΠ»Π° ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ Π²ΡΠΈΠ³ΡΡΡΠ΅ΠΉ ΠΈΠ³ΡΠΎΠΊΠΎΠ² Ρ ΡΡΡΡΠΎΠΌ ΡΡΠΈΡ ΡΠ²ΡΠ·Π΅ΠΉ. Π ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΌ Π²ΡΠ΄Π΅Π»ΡΡΡ ΡΡΠΈ ΠΏΠΎΠ΄Ρ ΠΎΠ΄Π° ΠΊ ΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΠ²ΡΠ·Π΅ΠΉ ΠΌΠ΅ΠΆΠ΄Ρ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ: ΡΡΡΠ°ΡΠ΅Π³ΠΈΡΠ΅ΡΠΊΠΈΠΉ, ΠΊΠΎΠΎΠΏΠ΅ΡΠ°ΡΠΈΠ²Π½ΡΠΉ ΠΈ Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈΠΉ.
ΠΡΠΈ ΡΡΡΠ°ΡΠ΅Π³ΠΈΡΠ΅ΡΠΊΠΎΠΌ ΠΏΠΎΠ΄Ρ ΠΎΠ΄Π΅ ΡΠ΅ΡΠ΅Π²ΡΡ ΠΈΠ³ΡΡ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ°ΡΡΠΌΠ°ΡΡΠΈΠ²Π°ΡΡ ΠΊΠ°ΠΊ ΠΊΠ»Π°ΡΡΠΈΡΠ΅ΡΠΊΡΡ ΠΈΠ³ΡΡ Π² Π½ΠΎΡΠΌΠ°Π»ΡΠ½ΠΎΠΉ ΡΠΎΡΠΌΠ΅: ΠΊΠ°ΠΆΠ΄ΡΠΉ ΠΈΠ³ΡΠΎΠΊ Π½Π΅Π·Π°Π²ΠΈΡΠΈΠΌΠΎ Π²ΡΠ±ΠΈΡΠ°Π΅Ρ ΡΠ²ΠΎΡ ΡΡΡΠ°ΡΠ΅Π³ΠΈΡ (ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΠΈΠ³ΡΠΎΠΊΠΎΠ², Ρ ΠΊΠΎΡΠΎΡΡΠΌΠΈ ΠΎΠ½ Π² Π΄Π°Π½Π½ΡΠΉ ΠΌΠΎΠΌΠ΅Π½Ρ ΠΆΠ΅Π»Π°Π΅Ρ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ ΡΠ²ΡΠ·Ρ ΠΈ ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΠΈΠ³ΡΠΎΠΊΠΎΠ², Ρ ΠΊΠΎΡΠΎΡΡΠΌΠΈ ΠΎΠ½ ΡΠ²ΡΠ·ΠΈ Π½Π΅ ΡΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°Π΅Ρ). Π ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠ΅ Π²ΡΠ±ΠΎΡΠ° ΡΠΎΡΠΌΠΈΡΡΠ΅ΡΡΡ ΡΠ΅ΡΠ΅Π²Π°Ρ ΡΡΡΡΠΊΡΡΡΠ°, ΠΊΠΎΡΠΎΡΠ°Ρ ΠΈ ΠΎΠΏΡΠ΅Π΄Π΅Π»ΡΠ΅Ρ Π²ΡΠΈΠ³ΡΡΡΠΈ ΠΈΠ³ΡΠΎΠΊΠΎΠ².
Π ΠΊΠΎΠΎΠΏΠ΅ΡΠ°ΡΠΈΠ²Π½ΠΎΠΌ Π²Π°ΡΠΈΠ°Π½ΡΠ΅ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΠΈΠ³ΡΡ ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠΎΠΉ ΡΠ²Π»ΡΠ΅ΡΡΡ Π²ΡΠ±ΠΎΡ ΠΏΡΠ°Π²ΠΈΠ»Π° ΡΠ°ΡΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ ΡΡΠΌΠΌΠ°ΡΠ½ΠΎΠ³ΠΎ Π²ΡΠΈΠ³ΡΡΡΠ° ΠΈΠ³ΡΠΎΠΊΠΎΠ² ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΎΠ±ΠΎΠΉ ΠΏΡΠΈ Π½Π΅ΠΊΠΎΡΠΎΡΠΎΠΉ Π½Π°ΠΏΠ΅ΡΠ΅Π΄ Π·Π°Π΄Π°Π½Π½ΠΎΠΉ ΠΈΠ»ΠΈ ΡΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ ΡΠ°ΠΌΠΈΠΌΠΈ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΡΡΡΠΊΡΡΡΠ΅. Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· ΡΠ°ΠΊΠΈΡ ΠΏΡΠ°Π²ΠΈΠ» ΡΠ°ΡΠΏΡΠ΅Π΄Π΅Π»Π΅Π½ΠΈΡ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ°ΡΡΠΌΠΎΡΡΠ΅ΡΡ Π²Π΅ΠΊΡΠΎΡ Π¨Π΅ΠΏΠ»ΠΈ (ΠΊΠ»Π°ΡΡΠΈΡΠ΅ΡΠΊΠΎΠ΅ ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ ΡΠ΅ΠΎΡΠΈΠΈ ΠΊΠΎΠΎΠΏΠ΅ΡΠ°ΡΠΈΠ²Π½ΡΡ ΠΈΠ³Ρ), ΠΏΠΎΡΡΡΠΎΠ΅Π½Π½ΡΠΉ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ Ρ ΡΡΡΡΠΎΠΌ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΡΡΡΠΊΡΡΡΡ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΡ.
ΠΡΠΈ ΡΠ°ΡΡΠΌΠΎΡΡΠ΅Π½ΠΈΠΈ Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΎΠ³ΠΎ ΠΏΠΎΠ΄Ρ ΠΎΠ΄Π° ΠΏΡΠ΅Π΄ΠΏΠΎΠ»Π°Π³Π°Π΅ΡΡΡ, ΡΡΠΎ ΡΠ΅ΡΠ΅Π²Π°Ρ ΡΡΡΡΠΊΡΡΡΠ° ΠΌΠΎΠΆΠ΅Ρ ΠΏΠ΅ΡΠ΅ΡΠΌΠ°ΡΡΠΈΠ²Π°ΡΡΡΡ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ ΠΏΠΎΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎ ΡΠΎΠ³Π»Π°ΡΠ½ΠΎ Π½Π΅ΠΊΠΎΡΠΎΡΠΎΠΌΡ ΠΏΠΎΡΡΠ΄ΠΊΡ ΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎΡΡΠΈ Ρ ΠΎΠ΄ΠΎΠ². ΠΡΠΈΠ½ΠΈΠΌΠ°ΡΡΠΈΠΉ ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ ΠΈΠ³ΡΠΎΠΊ ΠΌΠΎΠΆΠ΅Ρ ΠΈΡΠΊΠ»ΡΡΠΈΡΡ ΠΈΠ· ΡΠ΅ΡΠΈ Π½Π΅ ΠΏΡΠΈΠ½ΠΎΡΡΡΡΡ Π΅ΠΌΡ Π²ΡΠ³ΠΎΠ΄Ρ ΡΠ²ΡΠ·Ρ, Π»ΠΈΠ±ΠΎ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠΈΡΡ Π΄ΡΡΠ³ΠΈΠΌ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌ Π²Π·Π°ΠΈΠΌΠΎΠ²ΡΠ³ΠΎΠ΄Π½ΡΠ΅ ΡΠ²ΡΠ·ΠΈ.
«ΠΠ°Π»Π΄Π°» — Π»ΠΈΠ½Π³Π²ΠΈΡΡΠΈΡΠ΅ΡΠΊΠ°Ρ Π½Π°ΡΡΠΎΠ»ΡΠ½Π°Ρ ΠΈΠ³ΡΠ° Π΄Π»Ρ 2—4 ΠΈΠ³ΡΠΎΠΊΠΎΠ², Π² ΠΊΠΎΡΠΎΡΠΎΠΉ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΡΠΎΡΡΠ°Π²Π»ΡΡΡ ΡΠ»ΠΎΠ²Π° Ρ ΠΏΠΎΠΌΠΎΡΡΡ Π±ΡΠΊΠ², Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌΡΡ ΠΎΠΏΡΠ΅Π΄Π΅Π»ΡΠ½Π½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ Π½Π° ΠΊΠ²Π°Π΄ΡΠ°ΡΠ½ΠΎΠ΅ ΠΈΠ³ΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅. Π Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠΏΡΠ»ΡΡΠ½ΠΎΠΌ Π²Π°ΡΠΈΠ°Π½ΡΠ΅ ΠΈΠ³ΡΡ, ΠΊΠΎΡΠΎΡΡΠΉ ΠΈΠΌΠ΅Π΅Ρ ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ½ΡΡ ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΉ, ΡΠ»ΠΎΠ²Π° ΡΠΎΡΡΠ°Π²Π»ΡΡΡΡΡ ΠΏΠΎΡΡΠ΅Π΄ΡΡΠ²ΠΎΠΌ ΠΏΠ΅ΡΠ΅Ρ ΠΎΠ΄ΠΎΠ² ΠΎΡ Π±ΡΠΊΠ²Ρ ΠΊ Π±ΡΠΊΠ²Π΅ ΠΏΠΎΠ΄ ΠΏΡΡΠΌΡΠΌ ΡΠ³Π»ΠΎΠΌ.
1. ΠΠ±ΡΠΈΠ΅ ΡΠ²Π΅Π΄Π΅Π½ΠΈΡ, ΠΎΠ±Π·ΠΎΡ Π°Π½Π°Π»ΠΎΠ³ΠΎΠ² ΠΈ ΡΠΎΡΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΠΉ ΠΊ ΠΏΡΠΎΠ΅ΠΊΡΠΈΡΡΠ΅ΠΌΠΎΠΌΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠΌΡ ΡΡΠ΅Π΄ΡΡΠ²Ρ
1.1 ΠΠ±ΡΠΈΠ΅ ΡΠ²Π΅Π΄Π΅Π½ΠΈΡ ΠΎΠ± ΠΈΠ³ΡΠ΅ «ΠΠ°Π»Π΄Π°»
Π Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠΏΡΠ»ΡΡΠ½ΠΎΠΌ Π²Π°ΡΠΈΠ°Π½ΡΠ΅ ΠΈΠ³ΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΠ΅Ρ ΡΠΎΠ±ΠΎΠΉ 25-ΠΊΠ»Π΅ΡΠΎΡΠ½ΡΡ ΠΊΠ²Π°Π΄ΡΠ°ΡΠ½ΡΡ ΡΠ°Π±Π»ΠΈΡΡ, ΡΡΠ΅ΠΉΠΊΠΈ/ΠΊΠ»Π΅ΡΠΊΠΈ ΡΠ΅Π½ΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ ΠΊΠΎΡΠΎΡΠΎΠΉ ΡΠΎΠ΄Π΅ΡΠΆΠ°Ρ ΠΏΠΎ ΠΎΠ΄Π½ΠΎΠΉ Π±ΡΠΊΠ²Π΅, Π° ΡΡΡΠΎΠΊΠ° ΡΠ΅Π»ΠΈΠΊΠΎΠΌ — ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ»ΡΠ½ΠΎΠ΅ 5-Π±ΡΠΊΠ²Π΅Π½Π½ΠΎΠ΅ Π½Π°ΡΠΈΡΠ°ΡΠ΅Π»ΡΠ½ΠΎΠ΅ ΠΈΠΌΡ ΡΡΡΠ΅ΡΡΠ²ΠΈΡΠ΅Π»ΡΠ½ΠΎΠ΅ Π² ΠΈΠΌΠ΅Π½ΠΈΡΠ΅Π»ΡΠ½ΠΎΠΌ ΠΏΠ°Π΄Π΅ΠΆΠ΅ ΠΈ Π΅Π΄ΠΈΠ½ΡΡΠ²Π΅Π½Π½ΠΎΠΌ ΡΠΈΡΠ»Π΅ (ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²Π΅Π½Π½ΠΎΠΌ ΡΠΈΡΠ»Π΅, Π΅ΡΠ»ΠΈ ΡΠ»ΠΎΠ²ΠΎ Π½Π΅ ΠΈΠΌΠ΅Π΅Ρ Π΅Π΄ΠΈΠ½ΡΡΠ²Π΅Π½Π½ΠΎΠ³ΠΎ ΡΠΈΡΠ»Π°). Π Π°Π·ΠΌΠ΅ΡΡ ΠΏΠΎΠ»Ρ, ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΈ Π΄Π»ΠΈΠ½Π° ΡΠ»ΠΎΠ²Π° ΠΌΠΎΠ³ΡΡ Π²Π°ΡΡΠΈΡΠΎΠ²Π°ΡΡΡΡ, ΡΠ΅ΠΌ Π½Π΅ ΠΌΠ΅Π½Π΅Π΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΏΡΡΡΡΡ ΠΊΠ»Π΅ΡΠΎΠΊ Π² Π½Π°ΡΠ°Π»Π΅ ΠΈΠ³ΡΡ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±ΡΡΡ ΡΡΡΠ½ΡΠΌ, ΡΡΠΎΠ±Ρ Ρ ΠΎΠ±ΠΎΠΈΡ ΠΈΠ³ΡΠΎΠΊΠΎΠ² Π±ΡΠ»ΠΎ ΠΎΠ΄ΠΈΠ½Π°ΠΊΠΎΠ²ΠΎΠ΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Ρ ΠΎΠ΄ΠΎΠ²/ΡΠ»ΠΎΠ².
ΠΠΎ Π²ΡΠ΅ΠΌΡ ΡΠ²ΠΎΠ΅Π³ΠΎ Ρ ΠΎΠ΄Π° ΠΈΠ³ΡΠΎΠΊ ΠΌΠΎΠΆΠ΅Ρ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ Π±ΡΠΊΠ²Ρ Π² ΠΊΠ»Π΅ΡΠΊΡ, ΠΏΡΠΈΠΌΡΠΊΠ°ΡΡΡΡ ΠΏΠΎ Π²Π΅ΡΡΠΈΠΊΠ°Π»ΠΈ/Π³ΠΎΡΠΈΠ·ΠΎΠ½ΡΠ°Π»ΠΈ (Π² Π²Π°ΡΠΈΠ°Π½ΡΠ΅ «ΠΠΎΡΠΎΠ»Π΅Π²ΡΠΊΠΈΠΉ ΠΊΠ²Π°Π΄ΡΠ°Ρ» ΡΠ°ΠΊΠΆΠ΅ ΠΏΠΎ Π΄ΠΈΠ°Π³ΠΎΠ½Π°Π»ΠΈ) ΠΊ Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Π½ΠΎΠΉ ΠΊΠ»Π΅ΡΠΊΠ΅ ΡΠ°ΠΊΠΈΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ, ΡΡΠΎΠ±Ρ ΠΏΠΎΠ»ΡΡΠ°Π»Π°ΡΡ Π½Π΅ΡΠ°Π·ΡΡΠ²Π½Π°Ρ ΠΈ Π½Π΅ ΡΠ°ΠΌΠΎΠΏΠ΅ΡΠ΅ΡΠ΅ΠΊΠ°ΡΡΠ°ΡΡΡ ΠΏΡΡΠΌΠΎΡΠ³ΠΎΠ»ΡΠ½Π°Ρ Π»ΠΎΠΌΠ°Π½Π°Ρ («Π·ΠΌΠ΅ΠΉΠΊΠ°») ΠΈΠ· ΠΊΠ»Π΅ΡΠΊΠΈ Ρ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½Π½ΠΎΠΉ Π±ΡΠΊΠ²ΠΎΠΉ ΠΈ Π΄ΡΡΠ³ΠΈΡ Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Π½ΡΡ ΠΊΠ»Π΅ΡΠΎΠΊ, ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΡΡΠ°Ρ ΡΠΎΠ±ΠΎΠΉ ΡΠ»ΠΎΠ²ΠΎ (ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠ΅Π΅ ΠΎΠΏΠΈΡΠ°Π½Π½ΡΠΌ Π²ΡΡΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡΠΌ), ΠΈΠ»ΠΈ ΠΏΡΠΎΠΏΡΡΡΠΈΡΡ Ρ ΠΎΠ΄ (Π΅ΡΠ»ΠΈ ΠΎΠ±Π° ΠΈΠ³ΡΠΎΠΊΠ° ΡΡΠΈΠΆΠ΄Ρ ΠΏΠΎΠ΄ΡΡΠ΄ ΠΏΡΠΎΠΏΡΡΠΊΠ°ΡΡ Ρ ΠΎΠ΄, ΡΠΎ ΡΠΈΠΊΡΠΈΡΡΠ΅ΡΡΡ Π½ΠΈΡΡΡ). Π ΡΠ΅ΡΠ΅Π½ΠΈΠ΅ ΠΈΠ³ΡΡ Π΄ΠΎΠ»ΠΆΠ½Ρ ΡΠΎΠ±Π»ΡΠ΄Π°ΡΡΡΡ ΡΠ°ΠΊΠΆΠ΅ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ ΠΏΡΠ°Π²ΠΈΠ»Π°:
ΠΠ³ΡΠΎΠΊΠΈ Ρ ΠΎΠ΄ΡΡ ΠΏΠΎ ΠΎΡΠ΅ΡΠ΅Π΄ΠΈ (Π² Π²Π°ΡΠΈΠ°Π½ΡΠ΅ «ΠΠΎΡΠΎΠ»Π΅Π²ΡΠΊΠΈΠΉ ΠΊΠ²Π°Π΄ΡΠ°Ρ» Π΄Π»Ρ Π΄Π²ΡΡ ΠΈΠ³ΡΠΎΠΊΠΎΠ² Ρ ΠΎΠ΄Ρ Π΄Π²ΠΎΠΉΠ½ΡΠ΅, ΡΠΎ Π΅ΡΡΡ ΠΈΠ³ΡΠΎΠΊ, Π΅ΡΠ»ΠΈ Π½Π΅ ΠΏΡΠΎΠΏΡΡΠΊΠ°Π΅Ρ Ρ ΠΎΠ΄, Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅Ρ ΠΏΠΎΠ΄ΡΡΠ΄ Π΄Π²Π΅ Π±ΡΠΊΠ²Ρ Π² ΡΠ°Π·Π½ΡΠ΅ ΠΊΠ»Π΅ΡΠΊΠΈ).
ΠΠ°ΠΆΠ΄Π°Ρ ΠΊΠ»Π΅ΡΠΊΠ° ΡΠΎΠ΄Π΅ΡΠΆΠΈΡ ΡΠΎΠ»ΡΠΊΠΎ ΠΎΠ΄Π½Ρ Π±ΡΠΊΠ²Ρ, ΠΊΠ°ΠΆΠ΄Π°Ρ Π±ΡΠΊΠ²Π° Π² ΡΠΎΡΡΠ°Π²Π»Π΅Π½Π½ΠΎΠΌ ΡΠ»ΠΎΠ²Π΅ ΠΏΡΠΈΠ½ΠΎΡΠΈΡ ΠΈΠ³ΡΠΎΠΊΡ ΠΎΠ΄Π½ΠΎ ΠΎΡΠΊΠΎ.
Π‘Π»ΠΎΠ²ΠΎ Π΄ΠΎΠ»ΠΆΠ½ΠΎ ΡΠΎΠ΄Π΅ΡΠΆΠ°ΡΡΡΡ Ρ ΠΎΡΡ Π±Ρ Π² ΠΎΠ΄Π½ΠΎΠΌ ΡΠΎΠ»ΠΊΠΎΠ²ΠΎΠΌ ΠΈΠ»ΠΈ ΡΠ½ΡΠΈΠΊΠ»ΠΎΠΏΠ΅Π΄ΠΈΡΠ΅ΡΠΊΠΎΠΌ ΡΠ»ΠΎΠ²Π°ΡΠ΅ (ΠΈΠ»ΠΈ ΡΠ½ΡΠΈΠΊΠ»ΠΎΠΏΠ΅Π΄ΠΈΠΈ), ΠΏΡΠΈ ΡΡΠΎΠΌ Π·Π°ΠΏΡΠ΅ΡΠ°ΡΡΡΡ Π°Π±Π±ΡΠ΅Π²ΠΈΠ°ΡΡΡΡ, ΡΠ»ΠΎΠ²Π° Ρ ΡΠΌΠ΅Π½ΡΡΠΈΡΠ΅Π»ΡΠ½ΠΎ-Π»Π°ΡΠΊΠ°ΡΠ΅Π»ΡΠ½ΡΠΌΠΈ (Π±Π°Π½ΡΠΊΠ°, Π΄ΠΎΡΡΡΠΊΠ°, Π½ΠΎΠΆΠΈΠΊ) ΠΈ ΡΠ°Π·ΠΌΠ΅ΡΠ½ΠΎ-ΠΎΡΠ΅Π½ΠΎΡΠ½ΡΠΌΠΈ ΡΡΡΡΠΈΠΊΡΠ°ΠΌΠΈ (Π΄ΠΎΠΌΠΈΠ½Π°, Π·Π²Π΅ΡΡΠ³Π°, Π½ΠΎΠΆΠΈΡΠ°), Π΅ΡΠ»ΠΈ ΡΠ°ΠΊΠΈΠ΅ ΡΠ»ΠΎΠ²Π° Π½Π΅ ΠΈΠΌΠ΅ΡΡ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΠΎΠ³ΠΎ Π·Π½Π°ΡΠ΅Π½ΠΈΡ, Π° ΡΠ°ΠΊΠΆΠ΅ ΡΠ»ΠΎΠ²Π°, Π½Π΅ Π²Ρ ΠΎΠ΄ΡΡΠΈΠ΅ Π² ΡΠΎΡΡΠ°Π² ΡΡΡΡΠΊΠΎΠ³ΠΎ Π»ΠΈΡΠ΅ΡΠ°ΡΡΡΠ½ΠΎΠ³ΠΎ ΡΠ·ΡΠΊΠ°, ΡΠΎ Π΅ΡΡΡ Π²ΡΠ»ΡΠ³Π°ΡΠΈΠ·ΠΌΡ, Π΄ΠΈΠ°Π»Π΅ΠΊΡΠΈΠ·ΠΌΡ ΠΈ ΠΆΠ°ΡΠ³ΠΎΠ½ΠΈΠ·ΠΌΡ (ΠΈΠΌΠ΅ΡΡΠΈΠ΅ ΡΠ»ΠΎΠ²Π°ΡΠ½ΡΠ΅ ΠΏΠΎΠΌΠ΅ΡΡ Π²ΡΠ»ΡΠ³., Π΄ΠΈΠ°Π»., ΠΎΠ±Π»., ΠΆΠ°ΡΠ³. ΠΈ Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ½ΡΠ΅, Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ, ΡΠΎΠΊΡΠ°ΡΡΠ½Π½ΡΠ΅ Π½Π°Π·Π²Π°Π½ΠΈΡ ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠΈΡ ΡΠ΅Π³ΠΈΠΎΠ½ΠΎΠ²).
Π‘Π»ΠΎΠ²Π° Π² ΠΎΠ΄Π½ΠΎΠΉ ΠΈΠ³ΡΠ΅ ΠΏΠΎΠ²ΡΠΎΡΡΡΡΡΡ Π½Π΅ ΠΌΠΎΠ³ΡΡ, Π΄Π°ΠΆΠ΅ Π΅ΡΠ»ΠΈ ΡΡΠΎ ΠΎΠΌΠΎΠ½ΠΈΠΌΡ (Π² Π²Π°ΡΠΈΠ°Π½ΡΠ΅ «ΠΠΎΡΠΎΠ»Π΅Π²ΡΠΊΠΈΠΉ ΠΊΠ²Π°Π΄ΡΠ°Ρ» Π·Π°ΠΏΡΠ΅ΡΠ°Π΅ΡΡΡ ΡΠΎΡΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ»ΠΎΠ², ΡΠΆΠ΅ ΠΎΠ±ΡΠ°Π·ΠΎΠ²Π°Π²ΡΠΈΡ ΡΡ Π½Π° ΠΈΠ³ΡΠΎΠ²ΠΎΠΌ ΠΏΠΎΠ»Π΅, Π΄Π°ΠΆΠ΅ Π΅ΡΠ»ΠΈ ΠΎΠ½ΠΈ Π½Π΅ Π±ΡΠ»ΠΈ ΡΠΎΡΡΠ°Π²Π»Π΅Π½Ρ Π½ΠΈ ΠΎΠ΄Π½ΠΈΠΌ ΠΈΠ· ΠΈΠ³ΡΠΎΠΊΠΎΠ²).
ΠΠ³ΡΠ° Π·Π°ΠΊΠ°Π½ΡΠΈΠ²Π°Π΅ΡΡΡ ΡΠΎΠ³Π΄Π°, ΠΊΠΎΠ³Π΄Π°-Π»ΠΈΠ±ΠΎ Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Ρ Π²ΡΠ΅ ΠΊΠ»Π΅ΡΠΊΠΈ, Π»ΠΈΠ±ΠΎ Π½Π΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ ΡΠΎΡΡΠ°Π²ΠΈΡΡ ΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎΠ΅ ΡΠ»ΠΎΠ²ΠΎ ΡΠΎΠ³Π»Π°ΡΠ½ΠΎ ΡΠΊΠ°Π·Π°Π½Π½ΡΠΌ Π²ΡΡΠ΅ ΠΏΡΠ°Π²ΠΈΠ»Π°ΠΌ. ΠΡΠΈΠ³ΡΡΠ²Π°Π΅Ρ ΡΠΎΡ ΠΈΠ³ΡΠΎΠΊ, ΠΊΠΎΡΠΎΡΡΠΉ Π½Π°Π±Π΅ΡΡΡ Π±ΠΎΠ»ΡΡΠ΅Π΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΎΡΠΊΠΎΠ², ΠΊΡΠΎΠΌΠ΅ ΡΠ»ΡΡΠ°Ρ Π½ΠΈΡΡΠΈ ΠΏΠΎΡΠ»Π΅ ΡΡΠΎΠ΅ΠΊΡΠ°ΡΠ½ΠΎΠ³ΠΎ ΠΏΡΠΎΠΏΡΡΠΊΠ° Ρ ΠΎΠ΄Π° ΠΎΠ±ΠΎΠΈΠΌΠΈ ΠΈΠ³ΡΠΎΠΊΠ°ΠΌΠΈ.
Π ΠΈΡΡΠ½ΠΎΠΊ 1.1.1 ΠΠ³ΡΠ° «ΠΠ°Π»Π΄Π°». ΠΠ»Π°Π²Π½ΠΎΠ΅ ΠΈΠ³ΡΠΎΠ²ΠΎΠ΅ ΠΏΠΎΠ»Π΅.
1.2 ΠΠ±Π·ΠΎΡ Π°Π½Π°Π»ΠΎΠ³ΠΎΠ²
1. ΠΠ½Π΄ΡΠΎΠΉΠ΄-ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ «King Square».
Π ΠΈΡΡΠ½ΠΎΠΊ 1.2.1 ΠΠ°Π³ΡΡΠ·ΠΊΠ° ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ King Square
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ King Square ΡΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°Π΅ΡΡΡ Π½Π° ΠΠ½Π΄ΡΠΎΠΉΠ΄ ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ.
ΠΠΌΠ΅Π΅Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ Π²ΡΠ±ΠΎΡΠ° ΡΠ΅ΠΆΠΈΠΌΠ° ΠΈ ΡΠ°Π·ΠΌΠ΅ΡΠ° ΠΏΠΎΠ»Ρ. Π’Π°ΠΊ ΠΆΠ΅ ΠΈΠΌΠ΅Π΅Ρ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ Π²Π²ΠΎΠ΄Π° Π½Π°ΡΠ°Π»ΡΠ½ΠΎΠ³ΠΎ ΡΠ»ΠΎΠ²Π°.
Π‘Π΅ΡΠ΅Π²ΠΎΠ΅ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΠ΅ ΠΎΡΡΡΠ΅ΡΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠ΅ΡΠ΅Π· ΡΠ΅ΡΡ-ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ.
Π ΠΈΡΡΠ½ΠΎΠΊ 1.2.2 ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ ΠΈΠ³ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ King Square.
ΠΠ³ΡΠ° ΠΈΠΌΠ΅Π΅Ρ ΠΏΡΠΈΡΡΠ½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ. ΠΡΠ΄Π΅Π»Π΅Π½ΠΈΠ΅ ΡΠ»ΠΎΠ²Π° ΠΎΡΡΡΠ΅ΡΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠ΅ΡΠ΅Π· Π½Π°ΠΆΠ°ΡΠΈΠ΅ ΠΈ Π²Π΅Π΄Π΅Π½ΠΈΠ΅ ΠΏΠΎ ΡΠ΅Π½ΡΠΎΡΠ½ΠΎΡΡ ΡΠΊΡΠ°Π½Ρ.
Π ΠΈΡΡΠ½ΠΎΠΊ 1.2.3 ΠΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΡ ΠΈΠ³ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ King Square.
1.3 Π’ΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΠΏΡΠΎΠ΅ΠΊΡΠΈΡΡΠ΅ΠΌΠΎΠΌΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠΌΡ ΡΡΠ΅Π΄ΡΡΠ²Ρ
ΠΠ°Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠΈ
Π¦Π΅Π»ΡΡ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, ΠΊΠΎΡΠΎΡΠΎΠ΅ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΠ΅Ρ ΡΠΎΠ±ΠΎΠΉ ΡΠ΅ΡΠ΅Π²ΡΡ ΠΈΠ³ΡΡ «ΠΠ°Π»Π΄Π°» Π³Π΄Π΅ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΠΈ ΠΌΠΎΠ³ΡΡ ΠΈΠ³ΡΠ°ΡΡ Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅, Π»ΠΈΠ±ΠΎ ΠΏΠΎ ΡΠ΅ΡΠΈ.
ΠΡΠΏΠΎΠ»Π½ΡΠ΅ΠΌΡΠ΅ ΡΡΠ½ΠΊΡΠΈΠΈ
Β· ΠΡΠ±ΠΎΡ ΡΠ΅ΠΆΠΈΠΌΠ° ΠΈΠ³ΡΡ. ΠΠΎΡΡΡΠΏΠ½ΡΠ΅ ΡΠ΅ΠΆΠΈΠΌΡ:
1. ΠΠ³ΡΠ° Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅.
2. Π‘Π΅ΡΠ΅Π²Π°Ρ ΠΈΠ³ΡΠ°.
Β· ΠΡΠΈ ΡΠΎΠ·Π΄Π°Π½ΠΈΠΈ ΠΊΠΎΠΌΠ½Π°ΡΡ Π΄Π»Ρ ΠΈΠ³ΡΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΌΠΎΠΆΠ΅Ρ Π²ΡΠ±ΡΠ°ΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΈΠ³ΡΠΎΠΊΠΎΠ² ΠΈ ΡΠ°Π·ΠΌΠ΅Ρ ΠΌΠ°ΡΡΠΈΡΡ Π΄Π»Ρ Π²Π²ΠΎΠ΄Π° ΡΠ»ΠΎΠ².
Β· ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΌΠΎΠΆΠ΅Ρ Π²ΡΡΡΡΠΏΠ°ΡΡ Π² ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ ΠΊΠ»ΠΈΠ΅Π½ΡΠ° ΠΈ ΡΠ΅ΡΠ²Π΅ΡΠ° ΠΎΠ΄Π½ΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΠΎ.
Β· Π‘ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ΠΌ ΠΎΠ΄Π½ΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΠΎ ΠΌΠΎΠ³ΡΡ ΡΠ°Π±ΠΎΡΠ°ΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΉ.
ΠΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅
Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ Π²Ρ ΠΎΠ΄Π½ΡΡ Π΄Π°Π½Π½ΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡΡΡΡ Π°ΡΡΠ΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΈΠΎΠ½Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ, ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΡ Ρ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠΌ.
ΠΡΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅
Π ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ Π²ΡΡ ΠΎΠ΄Π½ΡΡ Π΄Π°Π½Π½ΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡΡΡΡ ΡΠΊΠ°ΡΠΈΠ²Π°Π΅ΠΌΡΠ΅ ΡΠ°ΠΉΠ»Ρ, ΠΎΠΏΠΈΡΠ°Π½ΠΈΡ ΡΠ°ΠΉΠ»ΠΎΠ².
Π’ΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΡΠΎΡΡΠ°Π²Ρ ΠΈ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ°ΠΌ ΡΠ΅Ρ Π½ΠΈΡΠ΅ΡΠΊΠΈΡ ΡΡΠ΅Π΄ΡΡΠ²
Β· ΠΡΠΎΡΠ΅ΡΡΠΎΡ: ΡΠ΅ΠΊΠΎΠΌΠ΅Π½Π΄ΡΠ΅ΠΌΠ°Ρ ΡΠ°ΡΡΠΎΡΠ° — 1.0 ΠΠΡ ΠΈ Π²ΡΡΠ΅.
Β· ΠΠΠ£: Π½Π΅ ΠΌΠ΅Π½Π΅Π΅ 512 ΠΠ±.
Β· ΠΠ΅ΡΡΠΊΠΈΠΉ Π΄ΠΈΡΠΊ: 32-bit — Π½Π΅ ΠΌΠ΅Π½Π΅Π΅ 850 ΠΠ±, 64-bit — Π½Π΅ ΠΌΠ΅Π½Π΅Π΅ 2 ΠΠ±.
Π’ΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠΉ ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΠΌΠΎΡΡΠΈ
ΠΠ° ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅, Π½Π° ΠΊΠΎΡΠΎΡΠΎΠΌ Π±ΡΠ΄Π΅Ρ ΡΠ°Π±ΠΎΡΠ°ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±ΡΡΡ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ΠΎ ΡΠ»Π΅Π΄ΡΡΡΠ΅Π΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΠ΅:
Β· .Net Framework 4.5
1.4 ΠΠΎΡΡΠ°Π½ΠΎΠ²ΠΊΠ° Π·Π°Π΄Π°ΡΠΈ
Π ΡΠ°ΠΌΠΊΠ°Ρ Π΄Π°Π½Π½ΠΎΠ³ΠΎ ΠΊΡΡΡΠΎΠ²ΠΎΠ³ΠΎ ΠΏΡΠΎΠ΅ΠΊΡΠ° Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠ°ΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΡΡΠ΅Π΄ΡΡΠ²ΠΎ, ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΡΡΠ΅Π΅ ΡΠΎΠ±ΠΎΠΉ ΡΠ΅ΡΠ΅Π²ΡΡ ΠΈΠ³ΡΡ «ΠΠ°Π»Π΄Π°». ΠΡΠΎ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π²ΡΠΏΠΎΠ»Π½ΡΡΡ ΡΡΠ½ΠΊΡΠΈΠΈ, ΠΎΠΏΠΈΡΠ°Π½Π½ΡΠ΅ Π² ΠΏΡΠ½ΠΊΡΠ΅ 1.3.
2. ΠΠ½Π°Π»ΠΈΠ· ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΠΉ ΠΊ ΠΠ‘ ΠΈ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠ° ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΡ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΠΉ
2.1 ΠΠ±ΠΎΡΠ½ΠΎΠ²Π°Π½ΠΈΠ΅ Π²ΡΠ±ΠΎΡΠ° ΡΠ΅Ρ Π½ΠΎΠ»ΠΎΠ³ΠΈΠΉ
ΠΠ»Π°ΡΡΠΎΡΠΌΠ°.NET Framework ΡΠΎΡΡΠΎΠΈΡ ΠΈΠ· ΠΎΠ±ΡΠ΅ΡΠ·ΡΠΊΠΎΠ²ΠΎΠΉ ΡΡΠ΅Π΄Ρ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ (ΡΡΠ΅Π΄Ρ CLR) ΠΈ Π±ΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠΈ ΠΊΠ»Π°ΡΡΠΎΠ².NET Framework. ΠΡΠ½ΠΎΠ²ΠΎΠΉ ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ.NET Framework ΡΠ²Π»ΡΠ΅ΡΡΡ ΡΡΠ΅Π΄Π° CLR. Π‘ΡΠ΅Π΄Ρ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΠΌΠΎΠΆΠ½ΠΎ ΡΡΠΈΡΠ°ΡΡ Π°Π³Π΅Π½ΡΠΎΠΌ, ΠΊΠΎΡΠΎΡΡΠΉ ΡΠΏΡΠ°Π²Π»ΡΠ΅Ρ ΠΊΠΎΠ΄ΠΎΠΌ Π²ΠΎ Π²ΡΠ΅ΠΌΡ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΠΈ ΠΏΡΠ΅Π΄ΠΎΡΡΠ°Π²Π»ΡΠ΅Ρ ΠΎΡΠ½ΠΎΠ²Π½ΡΠ΅ ΡΠ»ΡΠΆΠ±Ρ, ΡΠ°ΠΊΠΈΠ΅ ΠΊΠ°ΠΊ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠ°ΠΌΡΡΡΡ, ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠΎΡΠΎΠΊΠ°ΠΌΠΈ ΠΈ ΡΠ΄Π°Π»Π΅Π½Π½ΠΎΠ΅ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΠ΅. ΠΡΠΈ ΡΡΠΎΠΌ Π½Π°ΠΊΠ»Π°Π΄ΡΠ²Π°ΡΡΡΡ ΡΡΠ»ΠΎΠ²ΠΈΡ ΡΡΡΠΎΠ³ΠΎΠΉ ΡΠΈΠΏΠΈΠ·Π°ΡΠΈΠΈ ΠΈ Π΄ΡΡΠ³ΠΈΠ΅ Π²ΠΈΠ΄Ρ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ ΡΠΎΡΠ½ΠΎΡΡΠΈ ΠΊΠΎΠ΄Π°, ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠΈΠ²Π°ΡΡΠΈΠ΅ Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΡ ΠΈ Π½Π°Π΄Π΅ΠΆΠ½ΠΎΡΡΡ. Π€Π°ΠΊΡΠΈΡΠ΅ΡΠΊΠΈ ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅ΠΉ ΡΡΠ΅Π΄Ρ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΊΠΎΠ΄ΠΎΠΌ. ΠΠΎΠ΄, ΠΊΠΎΡΠΎΡΡΠΉ ΠΎΠ±ΡΠ°ΡΠ°Π΅ΡΡΡ ΠΊ ΡΡΠ΅Π΄Π΅ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ, Π½Π°Π·ΡΠ²Π°ΡΡ ΡΠΏΡΠ°Π²Π»ΡΠ΅ΠΌΡΠΌ ΠΊΠΎΠ΄ΠΎΠΌ, Π° ΠΊΠΎΠ΄, ΠΊΠΎΡΠΎΡΡΠΉ Π½Π΅ ΠΎΠ±ΡΠ°ΡΠ°Π΅ΡΡΡ ΠΊ ΡΡΠ΅Π΄Π΅ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ, Π½Π°Π·ΡΠ²Π°ΡΡ Π½Π΅ΡΠΏΡΠ°Π²Π»ΡΠ΅ΠΌΡΠΌ ΠΊΠΎΠ΄ΠΎΠΌ. ΠΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ° ΠΊΠ»Π°ΡΡΠΎΠ² ΡΠ²Π»ΡΠ΅ΡΡΡ ΠΊΠΎΠΌΠΏΠ»Π΅ΠΊΡΠ½ΠΎΠΉ ΠΎΠ±ΡΠ΅ΠΊΡΠ½ΠΎ-ΠΎΡΠΈΠ΅Π½ΡΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ ΠΊΠΎΠ»Π»Π΅ΠΊΡΠΈΠ΅ΠΉ Π΄ΠΎΠΏΡΡΠΊΠ°ΡΡΠΈΡ ΠΏΠΎΠ²ΡΠΎΡΠ½ΠΎΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠΈΠΏΠΎΠ², ΠΊΠΎΡΠΎΡΡΠ΅ ΠΏΡΠΈΠΌΠ΅Π½ΡΡΡΡΡ Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ — Π½Π°ΡΠΈΠ½Π°Ρ Ρ ΠΎΠ±ΡΡΠ½ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ, Π·Π°ΠΏΡΡΠΊΠ°Π΅ΠΌΡΡ ΠΈΠ· ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ, ΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ Ρ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈΠΌ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠΌ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ (GUI), ΠΈ Π·Π°ΠΊΠ°Π½ΡΠΈΠ²Π°Ρ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΠΌΠΈ, ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΡΡΠΈΠΌΠΈ ΠΏΠΎΡΠ»Π΅Π΄Π½ΠΈΠ΅ ΡΠ΅Ρ Π½ΠΎΠ»ΠΎΠ³ΠΈΡΠ΅ΡΠΊΠΈΠ΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΠΈ ASP.NET, ΡΠ°ΠΊΠΈΠ΅ ΠΊΠ°ΠΊ Web Forms ΠΈ Π²Π΅Π±-ΡΠ»ΡΠΆΠ±Ρ XML.
ΠΠ»Π°ΡΡ TcpClient Π·Π°ΠΏΡΠ°ΡΠΈΠ²Π°Π΅Ρ Π΄Π°Π½Π½ΡΠ΅ ΠΈΠ· ΡΠ΅ΡΡΡΡΠ° Π² ΠΈΠ½ΡΠ΅ΡΠ½Π΅ΡΠ΅ ΠΏΠΎ ΠΏΡΠΎΡΠΎΠΊΠΎΠ»Ρ TCP. ΠΠ΅ΡΠΎΠ΄Ρ ΠΈ ΡΠ²ΠΎΠΉΡΡΠ²Π° TcpClient ΡΠ΅Π·ΡΠΌΠΈΡΡΡΡ ΡΠ²Π΅Π΄Π΅Π½ΠΈΡ Π΄Π»Ρ ΡΠΎΠ·Π΄Π°Π½ΠΈΡ Socket Π΄Π»Ρ Π·Π°ΠΏΡΠΎΡΠ° ΠΈ ΠΏΠΎΠ»ΡΡΠ΅Π½ΠΈΡ Π΄Π°Π½Π½ΡΡ ΠΏΠΎ ΠΏΡΠΎΡΠΎΠΊΠΎΠ»Ρ TCP. ΠΠΎΡΠΊΠΎΠ»ΡΠΊΡ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΠΊ ΡΠ΄Π°Π»Π΅Π½Π½ΠΎΠΌΡ ΡΡΡΡΠΎΠΉΡΡΠ²ΠΎ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½ΠΎ Π² Π²ΠΈΠ΄Π΅ ΠΏΠΎΡΠΎΠΊΠ°, Π΄Π°Π½Π½ΡΠ΅ ΠΌΠΎΠΆΠ½ΠΎ ΡΡΠΈΡΡΠ²Π°ΡΡ ΠΈ Π·Π°ΠΏΠΈΡΡΠ²Π°ΡΡ Ρ ΠΏΠ»Π°ΡΡΠΎΡΠΌΠΎΠΉ.NET Framework ΠΏΠΎΡΠΎΠΊΠΌΠ΅ΡΠΎΠ΄Ρ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ. ΠΡΠΎΡΠΎΠΊΠΎΠ» TCP ΡΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°Π΅Ρ ΡΠΎΠ΅Π΄ΠΈΠ½Π΅Π½ΠΈΠ΅ Ρ ΡΠ΄Π°Π»Π΅Π½Π½ΠΎΠΉ ΠΊΠΎΠ½Π΅ΡΠ½ΠΎΠΉ ΡΠΎΡΠΊΠΎΠΉ, Π° Π·Π°ΡΠ΅ΠΌ ΠΏΠΎΠ»ΡΠ·Π°ΠΌΠΈ, ΡΠΎΠ΅Π΄ΠΈΠ½Π΅Π½ΠΈΠ΅ ΠΎΡΠΏΡΠ°Π²Π»ΡΡΡ ΠΈ ΠΏΠΎΠ»ΡΡΠ°ΡΡ ΠΏΠ°ΠΊΠ΅ΡΡ Π΄Π°Π½Π½ΡΡ . ΠΡΠΎΡΠΎΠΊΠΎΠ» TCP ΠΎΡΠ²Π΅ΡΠ°Π΅Ρ Π·Π° ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΠ΅, ΡΡΠΎ ΠΏΠ°ΠΊΠ΅ΡΡ Π΄Π°Π½Π½ΡΡ ΠΎΡΠΏΡΠ°Π²Π»Π΅Π½Ρ ΠΊ ΠΊΠΎΠ½Π΅ΡΠ½ΠΎΠΉ ΡΠΎΡΠΊΠ΅, ΠΈ ΡΠ±ΠΎΡΠΊΠ°, ΠΊΠΎΠ³Π΄Π° ΠΎΠ½ΠΈ ΠΏΠΎΡΡΡΠΏΠ°ΡΡ Π² ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½ΠΎΠΌ ΠΏΠΎΡΡΠ΄ΠΊΠ΅.
Π§ΡΠΎΠ±Ρ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ TCP, Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π·Π½Π°ΡΡ Π°Π΄ΡΠ΅Ρ ΡΡΡΡΠΎΠΉΡΡΠ²Π° ΡΠ΅ΡΠΈ ΠΏΡΠΈ ΡΠ°Π·ΠΌΠ΅ΡΠ΅Π½ΠΈΠΈ ΡΠ»ΡΠΆΠ±Ρ, ΠΈ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ Π·Π½Π°ΡΡ TCP-ΠΏΠΎΡΡ, ΡΠ»ΡΠΆΠ±Π° ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅Ρ Π΄Π»Ρ ΠΎΠ±ΠΌΠ΅Π½Π° Π΄Π°Π½Π½ΡΠΌΠΈ.
TcpListener ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ Π΄Π»Ρ ΠΊΠΎΠ½ΡΡΠΎΠ»Ρ ΠΏΠΎΡΡΠΎΠ² Π΄Π»Ρ Π²Ρ ΠΎΠ΄ΡΡΠΈΡ Π·Π°ΠΏΡΠΎΡΠΎΠ², Π° Π·Π°ΡΠ΅ΠΌ ΡΠΎΠ·Π΄Π°ΡΡ ΠΈΠ»ΠΈ Π‘ΠΎΠΊΠ΅Ρ ΠΈΠ»ΠΈ TcpClient, ΠΊΠΎΡΠΎΡΠΎΠ΅ ΡΠΏΡΠ°Π²Π»ΡΠ΅Ρ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ΠΌ ΠΊΠ»ΠΈΠ΅Π½ΡΡ. ΠΠ΅ΡΠΎΠ΄Start Π²Ρ ΠΎΠ΄ΠΈΡ ΠΏΡΠΎΡΠ»ΡΡΠΈΠ²Π°Π½ΠΈΠ΅, Π° ΠΌΠ΅ΡΠΎΠ΄ Stop ΠΎΡΠΊΠ»ΡΡΠΈΡΡ ΠΏΡΠΎΡΠ»ΡΡΠΈΠ²Π°Π½ΠΈΠ΅ ΠΏΠΎΡΡΠ°. ΠΠ΅ΡΠΎΠ΄ AcceptTcpClient ΠΏΡΠΈΠ½ΠΈΠΌΠ°Π΅Ρ Π·Π°ΠΏΡΠΎΡΡ Π²Ρ ΠΎΠ΄ΡΡΠ΅Π³ΠΎ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΈ ΡΠΎΠ·Π΄Π°Π΅Ρ TcpClientΠ΄Π»Ρ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ Π·Π°ΠΏΡΠΎΡΠ°, Π° ΠΌΠ΅ΡΠΎΠ΄ AcceptSocket ΠΏΡΠΈΠ½ΠΈΠΌΠ°Π΅Ρ Π·Π°ΠΏΡΠΎΡΡ Π²Ρ ΠΎΠ΄ΡΡΠ΅Π³ΠΎ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΈ ΡΠΎΠ·Π΄Π°Π΅Ρ Π‘ΠΎΠΊΠ΅Ρ Π΄Π»Ρ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ Π·Π°ΠΏΡΠΎΡΠ°.
Π ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌ ΠΏΡΠΈΠΌΠ΅ΡΠ΅ ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ΅ΡΠ²Π΅Ρ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ ΡΠ΅ΡΠΈ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΠΌΠΎΠ½ΠΈΡΠΎΡΠ° TcpListener Π½Π° TCP-ΠΏΠΎΡΡ 13. ΠΡΠΈ ΠΏΠΎΠ»ΡΡΠ΅Π½ΠΈΠΈ Π·Π°ΠΏΡΠΎΡΠ° Π²Ρ ΠΎΠ΄ΡΡΠ΅Π³ΠΎ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ, ΡΠ΅ΡΠ²Π΅Ρ ΠΎΡΠ²Π΅ΡΠ°Π΅Ρ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ ΡΠ΅ΠΊΡΡΠ΅ΠΉ Π΄Π°ΡΠΎΠΉ ΠΈ Π²ΡΠ΅ΠΌΠ΅Π½Π΅ΠΌ ΠΈΠ· Ρ ΠΎΡΡΠ°-ΡΠ΅ΡΠ²Π΅ΡΠ°.
2.2 Π‘ΠΏΠ΅ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΡ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΠΉ
Π Π°Π±ΠΎΡΠ° ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ Ρ ΡΠΎΡΠΊΠΈ Π·ΡΠ΅Π½ΠΈΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½Π° Π½Π° EDF0 Π΄ΠΈΠ°Π³ΡΠ°ΠΌΠΌΠ΅.
ΠΡΠ½ΠΎΠ²Π½ΡΠ΅ ΡΡΠ°ΠΏΡ ΡΡΠ½ΠΊΡΠΈΠΎΠ½ΠΈΡΠΎΠ²Π°Π½ΠΈΡ ΡΠΈΡΡΠ΅ΠΌΡ.
1. Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ½Π°ΡΡ.
ΠΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π½Π° ΡΡΠΎΠΌ ΡΡΠ°ΠΏΠ΅ Π²ΡΠ±ΠΈΡΠ°Π΅Ρ ΡΠΈΠΏ ΠΈΠ³ΡΡ, ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΉ ΠΈ ΡΠ°Π·ΠΌΠ΅Ρ ΠΌΠ°ΡΡΠΈΡΡ. Π‘ΠΎΠ·Π΄Π°ΡΡΡΡ ΠΊΠΎΠΌΠ½Π°ΡΠ°. Π Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ Π²ΡΠ±ΡΠ°Π½Π½ΠΎΠ³ΠΎ ΡΠΈΠΏΠ° ΠΈΠ³ΡΡ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΡΡΡΡ Π½Π°ΡΡΡΠΎΠΉΠΊΠ° ΠΏΡΠΎΡΠ»ΡΡΠΈΠ²Π°Π½ΠΈΡ ΠΏΠΎΡΡΠ° ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ (ΠΏΠΎ ΡΠΌΠΎΠ»ΡΠ°Π½ΠΈΡ ΡΡΠΎ 1986). ΠΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ ΡΡΠ°ΠΏΠ° — Π·Π°ΠΏΡΠΎΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π½Π° Π½Π°ΡΠ°Π»ΠΎ ΠΈΠ³ΡΡ. ΠΡΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — Π²ΡΠ±ΡΠ°Π½Π½ΡΠΉ ΡΠΈΠΏ ΠΈΠ³ΡΡ, ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΡ ΠΈΠ³ΡΡ.
2. ΠΠΆΠΈΠ΄Π°Π½ΠΈΠ΅ ΠΎΠΏΠΏΠΎΠ½Π΅Π½ΡΠΎΠ². ΠΠ° ΡΡΠ°ΠΏΠ΅ ΠΎΠΆΠΈΠ΄Π°Π½ΠΈΡ ΠΎΠΏΠΏΠΎΠ½Π΅Π½ΡΠΎΠ² ΠΏΠΎΡΠ»Π·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΎΠΆΠΈΠ΄Π°Π΅Ρ ΠΊΠΎΠ³Π΄Π° Π΄ΡΡΠ½ΠΈΠ΅ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΠΈ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ°ΡΡΡ ΠΊ ΡΠΎΠ·Π΄Π°Π½Π½ΠΎΠΉ ΠΊΠΎΠΌΠ½Π°ΡΠ΅. ΠΡΠ»ΠΈ Π²ΡΠ±ΡΠ°Π½ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΠ΅ΠΆΠΈΠΌ ΠΈΠ³ΡΡ, ΡΠΎ ΡΡΠΎΡ ΡΡΠ°ΠΏ ΠΏΡΠΎΠΏΡΡΠΊΠ°Π΅ΡΡΡ ΠΈ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠ΅ΡΠ΅Ρ ΠΎΠ΄ΠΈΡ ΠΊ ΡΡΠ°ΠΏΡ «ΠΡΠΎΡΠ΅ΡΡ ΠΈΠ³ΡΡ». ΠΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — Π²ΡΠ±ΡΠ°Π½Π½ΡΠΉ ΡΠΈΠΏ ΠΊΠΎΠΌΠ½Π°ΡΡ. ΠΡΡ ΠΎΠ΄Π½Π²Π΅ Π΄Π°Π½Π½ΡΠ΅ — ΡΠΏΠΈΡΠΎΠΊ ΡΡΠ°ΡΡΠ½ΠΈΠΊΠΎΠ².
3. ΠΡΠΎΡΠ΅ΡΡ ΠΈΠ³ΡΡ ΠΠ° ΡΡΠΎΠΌ ΡΡΠ°ΠΏΠ΅ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΠΈ ΠΏΠΎΠΎΡΠ΅ΡΡΠ΄Π½ΠΎ Π΄ΠΎΠ±Π°Π²Π»ΡΡΡ Π±ΡΠΊΠ²Ρ Π½Π° ΠΌΠ°ΡΡΠΈΡΡ, Π²ΡΠ±ΠΈΡΠ°ΡΡ ΡΠ»ΠΎΠ²Π°, ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΆΠ΄Π°ΡΡ ΠΈΡ Π²ΡΠ±ΠΎΡ. ΠΡΠΎΡΠ΅ΡΡ ΠΏΡΠΎΠ΄ΠΎΠ»ΠΆΠ°Π΅ΡΡΡ ΠΏΠΎΠΊΠ° Π² ΠΌΠ°ΡΡΠΈΡΠ΅ ΡΠ»ΠΎΠ² Π΅ΡΡΡ ΡΠ²ΠΎΠ±ΠΎΠ΄Π½ΡΠ΅ ΠΊΠ»Π΅ΡΠΊΠΈ. ΠΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — ΡΠΏΠΈΡΠΎΠΊ ΡΡΠ°ΡΡΠ½ΠΈΠΊΠΎΠ², ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΎΠ½Π½ΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ. ΠΡΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Π½Π°Ρ ΠΌΠ°ΡΡΠΈΡΠ° ΠΈ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΠ° ΠΈΠ³ΡΠΎΠΊΠΎΠ².
4. ΠΠΎΠ΄Π²Π΅Π΄Π΅Π½ΠΈΠ΅ ΠΈΡΠΎΠ³ΠΎΠ² ΠΈΠ³ΡΡ.
ΠΠ° ΡΡΠΎΠΌ ΡΡΠ°ΠΏΠ΅ ΠΏΠΎΠ΄Π½ΠΈΠΌΠ°Π΅ΡΡΡ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΠ° Π²ΡΠ±ΡΠ°Π½Π½ΡΡ ΡΠ»ΠΎΠ². ΠΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΡΡ ΠΏΠΎΠ΄ΡΡΡΡ Π±ΡΠΊΠ². ΠΠ³ΡΠΎΠΊ, Π½Π°Π±ΡΠ°Π²ΡΠΈΠΉ Π½Π°ΠΈΠ±ΠΎΠ»ΡΡΠ΅Π΅ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ Π±ΡΠΊΠ² ΡΡΠ°Π½ΠΎΠ²ΠΈΡΡΡ ΠΏΠΎΠ±Π΅Π΄ΠΈΡΠ΅Π»Π΅ΠΌ. ΠΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Π½Π°Ρ ΠΌΠ°ΡΡΠΈΡΠ° ΠΈ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΠ° ΠΈΠ³ΡΠΎΠΊΠΎΠ². ΠΡΡ ΠΎΠ΄Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅ — ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΡ ΠΈΠ³ΡΡ (ΠΈΠΌΡ ΠΏΠΎΠ±Π΅Π΄ΠΈΡΠ΅Π»Ρ).
3. ΠΡΠ½ΠΎΠ²Π½ΡΠ΅ ΠΊΠ»Π°ΡΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΈ ΠΈΡ ΠΎΠΏΠΈΡΠ°Π½ΠΈΠ΅
ΠΠΌΡ ΠΊΠ»Π°ΡΡΠ° | ΠΠΏΠΈΡΠ°Π½ΠΈΠ΅ ΠΊΠ»Π°ΡΡΠ° | |
ΠΠΎΠ³ΠΈΠΊΠ° ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ | ||
DisplayManager | ΠΠ»Π°ΡΡ, ΠΎΡΠ²Π΅ΡΠ°ΡΡΠΈΠΉ Π·Π° ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΈΡ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ. | |
DisplaySettings | ΠΠ»Π°ΡΡ-Ρ ΡΠ°Π½ΠΈΡΠ΅Π»Ρ Π½Π°ΡΡΡΠΎΠ΅ΠΊ Π΄Π»Ρ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ. | |
GameLogicControls | ΠΠ»Π°ΡΡ Ρ ΡΠ°Π½ΠΈΡΠ΅Π»Ρ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ, ΠΊΠΎΡΠΎΡΡΠ΅ ΡΡΠ°ΡΡΠ²ΡΡΡ Π² ΠΏΡΠΎΡΠ΅ΡΡΠ΅ ΠΈΠ³ΡΡ. | |
DisplayCell | Π―ΡΠ΅ΠΉΠΊΠ° ΠΌΠ°ΡΡΠΈΡΡ. ΠΠ³ΡΠΎΠ²ΠΎΠΉ ΡΠ»Π΅ΠΌΠ΅Π½Ρ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ, ΠΊΠΎΡΠΎΡΡΠΉ Ρ ΡΠ°Π½ΠΈΡ Π²ΡΡΠ°Π²Π»Π΅Π½Π½ΡΡΡ Π±ΡΠΊΠ²Ρ | |
ΠΠΎΡΡΠ΅Π΄Π½ΠΈΡΠ΅ΡΡΠ²ΠΎ | ||
NegotiationManager | ΠΠ»Π°ΡΡ ΠΏΠΎΡΡΠ΅Π΄Π½ΠΈΠΊ. Π‘Π²ΡΠ·ΡΠ²Π°Π΅Ρ ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΎΠ±ΠΎΠΉ Π»ΠΎΠ³ΠΈΠΊΡ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ, ΠΈΠ³ΡΠΎΠ²ΡΡ Π»ΠΎΠ³ΠΈΠΊΡ ΠΈ Π»ΠΎΠ³ΠΈΠΊΡ ΠΏΠ΅ΡΠ΅Π΄Π°ΡΠΈ Π΄Π°Π½Π½ΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ ΠΈ Π»ΠΎΠ³ΠΈΠΊΡ ΡΠ΅ΡΠ΅Π»ΠΈΠ·Π°ΡΠΈΠΈ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ Π΄Π»Ρ ΠΏΠ΅ΡΠ΅Π΄Π°ΡΠΈ Π΄Π°Π½Π½ΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ. | |
Π‘Π΅ΡΠ΅Π²Π°Ρ Π»ΠΎΠ³ΠΈΠΊΠ° | ||
NetworkManager | Π‘ΠΎΠ·Π΄Π°Π½ΠΈΡ ΠΊΠΎΠΌΠ½Π°Ρ, ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΊ ΠΊΠΎΠΌΠ½Π°ΡΠ΅, ΠΎΡΠΏΡΠ°Π²ΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ ΠΊΠ»ΠΈΠ΅Π½ΡΠ°ΠΌ, ΠΎΠΎΠΏΠΎΠ²Π΅ΡΠ΅Π½ΠΈΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΈΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ ΠΎ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎΡΡΠΈ ΡΠΌΠ΅Π½Ρ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»Π°. | |
NetworkMassageHandler | ΠΠ»Π°ΡΡ Π΄Π»Ρ ΠΎΠ±ΡΠ°Π±ΠΎΡΠΊΠΈ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ, ΠΏΠΎΠ»ΡΡΠ΅Π½Π½ΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ ΠΈ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΠΎΡΡΠΎΡΠ½ΠΈΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ. | |
MessageType | Π’ΠΈΠΏ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ | |
NetworkClient | Π‘Π΅ΡΠ΅Π²ΠΎΠΉ ΠΊΠ»ΠΈΠ΅Π½Ρ. ΠΠ»Π°ΡΡ ΠΎΡΠ½ΠΎΠ²Π°Π½Π½ΡΠΉ Π½Π° TCP ΠΊΠ»ΠΈΠ΅Π½ΡΠ΅ Π΄Π»Ρ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΡ ΠΊΠ»ΠΈΠ΅Π½ΡΠΊΠΎΠ³ΠΎ ΠΈ ΡΠ΅ΡΠ²Π΅ΡΠ½ΠΎΠ³ΠΎ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ. | |
NetworkServer | Π‘Π΅ΡΠ΅Π²ΠΎΠΉ ΡΠ΅ΡΠ²Π΅Ρ. ΠΠ»Π°ΡΡ, ΠΎΡΠ½ΠΎΠ²Π°Π½Π½ΡΠΉ Π½Π° TCP ΡΠ΅ΡΠ²Π΅ΡΠ΅ Π΄Π»Ρ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΡ Ρ ΠΊΠ»ΠΈΠ΅Π½ΡΡΠΊΠΈΠΌΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΠΌΠΈ. | |
Π‘Π΅ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΡ | ||
SerializerManager | ΠΠ»Π°ΡΡ Π΄Π»Ρ ΡΠ΅ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΠΈ Π΄Π΅ΡΠ΅ΡΠ΅Π»ΠΈΠ·Π°ΡΠΈΠΈΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΈΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ ΠΏΠ΅ΡΠ΅Π΄Π°Π²Π°Π΅ΠΌΡΡ ΠΏΠΎ ΡΠ΅ΡΠΈ. | |
SettingsManager | ΠΠ»Π°ΡΡ Π΄Π»Ρ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ ΠΈΠ³ΡΠΎΠ²ΡΠΌΠΈ Π½Π°ΡΡΡΠΎΠΉΠΊΠ°ΠΌΠΈ. | |
ΠΠ³ΡΠΎΠ²Π°Ρ Π»ΠΎΠ³ΠΈΠΊΠ° | ||
GamePlayManager | ΠΠ»Π°ΡΡ Π΄Π»Ρ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ ΠΈΠ³ΡΠΎΠ²ΠΎΠΉ Π»ΠΎΠ³ΠΈΠΊΠΎΠΉ. | |
GameSattistics | ΠΠΎΠ»Π»Π΅ΠΊΡΠΈΡ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² ΠΎΡΡΠ°ΠΆΠ°ΡΡΠΈΡ ΡΡΠ°ΡΠΈΡΡΠΈΠΊΡ ΠΈΠ³ΡΡ. | |
LogicCell | ΠΠΎΠ³ΠΈΡΠ΅ΡΠΊΠ°Ρ Π°Π±ΡΡΡΠ°ΠΊΡΠΈΡ ΡΡΠ΅ΠΉΠΊΠΈ ΠΌΠ°ΡΡΠΈΡΡ | |
Player | ΠΠ³ΡΠΎΠΊ — ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ | |
Word | ΠΠ±ΡΡΡΠ°ΠΊΡΠΈΡ ΡΠ»ΠΎΠ²Π°. | |
ΠΠ·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΠΈΠ΅ ΠΈΠ³ΡΠΎΠ²ΠΎΠΉ Π»ΠΎΠ³ΠΈΠΊΠΈ ΠΈ Π»ΠΎΠ³ΠΈΠΊΠΈ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ Ρ ΡΠ΅Π»ΡΡ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠ°Π½ΠΈΡ ΠΈΠ½ΠΊΠ°ΠΏΡΡΠ»ΡΡΠΈΠΈ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ ΠΏΡΠΈ ΠΏΠΎΠΌΠΎΡΠΈ Π΄Π΅Π»Π΅Π³Π°ΡΠΎΠ².
ΠΠ΅Π»Π΅Π³Π°Ρ | ΠΠ°Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ | |
void DisplayMatrixCells (List logicCells); | ΠΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π½Π° Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΌ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ΅ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½Π½ΡΡ Π»ΠΎΠ³ΠΈΡΠ΅ΡΠΊΠΈΡ ΡΡΠ΅Π΅ΠΊ ΠΈΠ³ΡΠΎΠ²ΠΎΠΉ Π»ΠΎΠ³ΠΈΠΊΠΈ. | |
void DisplayMessage (string message); | ΠΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π½Π° Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΌ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ΅ ΠΏΠΎΠ΄ΡΠΊΠ°Π·ΠΊΠΈ. | |
void DisplayError (string message); | ΠΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π½Π° Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΌ ΠΎΡΠΈΠ±ΠΊΠΈ. | |
bool ConditionAction (string word); | ΠΡΠΎΠ²Π΅ΡΠΊΠ° ΡΡΠ»ΠΎΠ²ΠΈΡ. | |
4. Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΡΠ΅ΡΡΠΈΡΠΎΠ²Π°Π»ΠΎΡΡ Π½Π° ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ°Ρ ΡΠ»Π΅Π΄ΡΡΡΠΈΡ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΉ:
Β· Intel Core i5−3470 (3.2 GHz), 8 Gb RAM, 500 Gb HDD.
Β· AMD A8−4500M (1,9 GHz), 6 Gb RAM, 500 Gb HDD.
Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΠ»ΠΎΡΡ Ρ ΠΏΠΎΠΌΠΎΡΡΡ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΠΎ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠ°Π½Π½ΠΎΠ³ΠΎ ΠΊΠ»ΠΈΠ΅Π½ΡΡΠΊΠΎΠ³ΠΎ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ.
ΠΠ° ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΈΠ· ΠΌΠ°ΡΠΈΠ½ Π±ΡΠ»ΠΎ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ΠΎ Π²ΡΠ΅ ΡΡΠ΅Π±ΡΠ΅ΠΌΠΎΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΠ΅. ΠΠ° ΡΡΠΈΡ ΡΠΈΡΡΠ΅ΠΌΠ°Ρ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΡΠ°Π±ΠΎΡΠ°Π»ΠΎ Π±ΡΡΡΡΠΎ, Π±Π΅Π· Π·Π°Π²ΠΈΡΠ°Π½ΠΈΠΉ.
ΠΡΠ΅ ΠΈΡΠΊΠ»ΡΡΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΠΈΡΡΠ°ΡΠΈΠΈ Π² ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ ΠΏΠ΅ΡΠ΅Ρ Π²Π°ΡΡΠ²Π°ΡΡΡΡ ΠΈ ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΠΎ Π²ΠΎΠ·Π²ΡΠ°ΡΠ°ΡΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠΈΠ΅ ΠΊΠΎΠ΄Ρ ΠΎΡΠ²Π΅ΡΠΎΠ².
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ ΡΡΠ°Π±ΠΈΠ»ΡΠ½ΠΎ, ΠΏΠ°Π΄Π΅Π½ΠΈΠΉ ΠΈ ΠΊΡΠΈΡΠΈΡΠ΅ΡΠΊΠΈΡ ΠΎΡΠΈΠ±ΠΎΠΊ Π·Π°ΠΌΠ΅ΡΠ΅Π½ΠΎ Π½Π΅ Π±ΡΠ»ΠΎ.
Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠ΅ΠΆΠΈΠΌΠ° Π½Π° ΠΈΠ³ΡΡ Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅
Π’Π΅ΡΡ | ΠΠΆΠΈΠ΄Π°Π΅ΠΌΠΎΠ΅ ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠ΅ | Π Π΅Π·ΡΠ»ΡΡΠ°Ρ | |
ΠΠ°ΠΆΠ°ΡΡ «ΠΠ³ΡΠ° Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅», Π²ΡΠ±ΡΠ°ΡΡ ΠΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΈΠ³ΡΠΎΠΊΠΎΠ² 3, — Π Π°Π·ΠΌΠ΅Ρ ΠΌΠ°ΡΡΠΈΡΡ 7. ΠΠ°ΠΆΠ°ΡΡ ΠΊΠ½ΠΎΠΏΠΊΡ «ΠΠ» | ΠΠΎΡΠ²ΠΈΠ»ΠΎΡΡ 3 ΠΏΠΎΠ»Ρ Π΄Π»Ρ Π²Π²ΠΎΠ΄Π° ΠΈΠΌΡΠ½ ΠΏΠΎΠ»Π·ΠΎΠ²Π°ΡΠ΅Π»Ρ. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½ | |
ΠΠ°ΠΆΠ°ΡΡ Π½Π° ΠΊΠ½ΠΎΠΏΠΊΡ «ΠΠ» | ΠΠΎΡΠ²ΠΈΠ»ΠΎΠ°ΡΡ ΠΌΠ°ΡΡΠΈΡΠ° 7 Π½Π° 7. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½ | |
ΠΡΠ±ΡΠ°ΡΡ ΡΡΠ΅ΠΉΠΊΡ Π΄Π»Ρ Π²ΡΡΠ°Π²ΠΊΠΈ Π±ΡΠΊΠ²Ρ. ΠΠΎΠΏΡΡΠ°ΡΡΡΡ Π²ΡΠ±ΡΠ°ΡΡ ΡΡΠ΅ΠΉΠΊΡ ΠΎΡΠ΄Π°Π»ΡΠ½Π½ΡΡ ΠΎΡ Π΄ΡΡΠ³ΠΈΡ Π±ΡΠΊΠ² Π½Π° Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΡΡΠ΅Π΅ΠΊ. | Π―ΡΠ΅ΠΉΠΊΠ° ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠ΅Π½Π° ΠΎΡΠ°Π½ΠΆΠ΅Π²ΡΠΌ ΡΠ²Π΅ΡΠΎΠΌ. ΠΡΠΈ Π²ΡΠ±ΠΎΡΠ΅ Π½Π΅ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½ΠΎΠΉ ΡΡΠ΅ΠΉΠΊΠΈ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠ΅Π΅ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½ | |
ΠΡΠ±ΡΠ°ΡΡ ΡΠ»ΠΎΠ²ΠΎ. ΠΠΎΠΏΡΡΠ°ΡΡΡΡ Π²ΡΠ±ΡΠ°ΡΡ ΡΠ»ΠΎΠ²ΠΎ Π±Π΅Π· Π²ΡΡΠ°Π²Π»Π΅Π½Π½ΠΎΠΉ Π±ΡΠΊΠ²Ρ. | ΠΡΠ±ΡΠ°Π½Π½ΠΎΠ΅ ΡΠ»ΠΎΠ²ΠΎ ΠΏΠΎΠ΄ΡΠ²Π΅ΡΠΈΠ²Π°Π΅ΡΡΡ ΠΎΡΠ°Π½ΠΆΠ΅Π²ΡΠΌ ΡΠ²Π΅ΡΠΎΠΌ. ΠΡΠΈ ΠΏΠΎΠΏΡΡΠΊΠ΅ Π²ΡΠ±ΠΎΡΠ° ΡΠ»ΠΎΠ²Π° Π±Π΅Π· Π²ΡΡΠ°Π²Π»Π΅Π½Π½ΠΎΠΉ Π±ΡΠΊΠ²Ρ Π²ΡΠ±ΠΎΡ ΡΠ»ΠΎΠ²Π° Π·Π°ΠΏΡΠ΅ΡΠ°Π΅ΡΡΡ. ΠΡΠ²ΠΎΠ΄ΠΈΡΡΡ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½ | |
Π’Π΅ΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠ΅ΡΠ΅Π²ΠΎΠ³ΠΎ ΡΠ΅ΠΆΠΈΠΌΠ° Π½Π° ΠΈΠ³ΡΡ
Π’Π΅ΡΡ | ΠΠΆΠΈΠ΄Π°Π΅ΠΌΠΎΠ΅ ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠ΅ | Π Π΅Π·ΡΠ»ΡΡΠ°Ρ | |
ΠΠ°ΠΏΡΡΡΠΈΡΡ ΡΡΠΈ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠ° ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ. | ΠΠ° ΡΡΡΡ ΡΠΊΠ·Π΅ΠΌΠΏΠ»ΡΡΠ°Ρ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΡΠ°ΡΡΠΎΠ²ΠΎΠ΅ ΠΌΠ΅Π½Ρ. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½. | |
ΠΠ° ΠΏΠ΅ΡΠ²ΠΎΠΌ Π²ΡΠ±ΡΠ°ΡΡ ΡΠ΅ΠΆΠΈΠΌ «Π‘Π΅ΡΠ΅Π²Π°Ρ ΠΈΠ³ΡΠ°», Π²ΡΠ±ΡΠ°ΡΡ «Π‘ΠΎΠ·Π΄Π°ΡΡ ΠΊΠΎΠΌΠ½Π°ΡΡ», Π²ΡΠ±ΡΠ°ΡΡ 3 ΡΠ΅Π»ΠΎΠ²Π΅ΠΊΠ° ΠΈ ΡΠ°Π·ΠΌΠ΅Ρ ΠΌΠ°ΡΡΠΈΡΡ 5. ΠΠ°ΠΆΠ°ΡΡ ΠΊΠ½ΠΎΠΏΠΊΡ «ΠΠ». | ΠΠ° ΡΠΊΡΠ°Π½Π΅ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΡΠΌΠ° Ρ Π·Π°Π΄Π°Π½ΠΈΠ΅ΠΌ ΠΈΠΌΠ΅Π½ΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ. ΠΡΠΈ Π½Π°ΠΆΠ°ΡΠΈΠΈΠΈ «ΠΠ» ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ «ΠΠΆΠΈΠ΄Π°ΠΉΡΠ΅». | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½. | |
ΠΠ° ΠΊΠ»ΠΈΠ΅Π½ΡΡΠΊΠΈΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΡ Π²ΡΠ±ΡΠ°ΡΡ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΡΠ΅ΠΆΠΈΠΌ ΠΈΠ³ΡΡ, ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠΈΡΡΡΡ ΠΊ ΡΠ΅ΡΠ²Π΅ΡΡ, Π½Π°ΠΆΠ°ΡΡ ΠΊΠ»Π°Π²ΠΈΡΡ «ΠΠ» | ΠΠ° ΡΠΊΡΠ°Π½Π΅ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΡΠΌΠ° Π·Π°Π΄Π°Π½ΠΈΡ ΠΈΠΌΠ΅Π½ΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ ΠΈ ip ΡΠ΅ΡΠ²Π΅ΡΠ°. ΠΠΎΡΠ»Π΅ Π½Π°ΠΆΠ°ΡΠΈΡ «ΠΠ» ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ Π½Π°Π΄ΠΏΠΈΡΡ ΠΎΠΆΠΈΠ΄Π°Π½ΠΈΠ΅. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½. | |
ΠΠΎΡΠ»Π΅ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΊ ΡΠ΅ΡΠ²Π΅ΡΡ Π΅ΡΡ 2 ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΉ Π½Π° Π²ΡΠ΅Ρ 3 ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΡ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΏΠΈΡΠΎΠΊ ΡΡΠ°ΡΡΠ½ΠΈΠΊΠΎΠ². ΠΠ°ΠΆΠ°ΡΡ ΠΊΠ½ΠΎΠΏΠΊΡ ΠΠ | ΠΠ° ΡΠΊΡΠ°Π½Π΅ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΠΌΠ°ΡΡΠΈΡΠ° 5 Π½Π° ΠΏΡΡΡ. ΠΡΠΎΡΠ΅ΡΡ ΠΈΠ³ΡΡ Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ΅Π½ ΡΠ΅ΠΆΠΈΠΌΡ Π½Π° ΠΎΠ΄Π½ΠΈΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅. | Π’Π΅ΡΡ ΠΏΡΠΎΠΉΠ΄Π΅Π½. | |
5. Π ΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²ΠΎ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ
Π Π°Π·ΡΠ°Π±ΠΎΡΠ°Π½Π½ΠΎΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΡΠ²Π»ΡΠ΅ΡΡΡ ΠΎΠ΄Π½ΠΎΠ²ΡΠ΅ΠΌΠ΅Π½Π½ΠΎ ΠΈ ΠΊΠ»ΠΈΠ΅Π½ΡΡΠΊΠΈΠΌ ΠΈ ΡΠ΅ΡΠ²Π΅ΡΠ½ΡΠΌ. ΠΡΠΈ Π·Π°Π³ΡΡΠ·ΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΡΠΌΠ°.
Π ΠΈΡΡΠ½ΠΎΠΊ 5.1. ΠΠ½Π΅ΡΠ½ΠΈΠΉ Π²ΠΈΠ΄ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΠΎΠΆΠ½ΠΎ Π²ΡΠ±ΡΠ°ΡΡ Π΄Π²Π° Π²Π°ΡΠΈΠ°Π½ΡΠ° ΠΈΠ³ΡΡ: ΠΠ³ΡΠ° Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅ ΠΈ ΠΈΠ³ΡΠ° Π½Π° ΠΏΠΎ ΡΠ΅ΡΠΈ.
ΠΡΠΈ Π²ΡΠ±ΠΎΡΠ΅ ΠΈΠ³ΡΡ Π½Π° ΠΎΠ΄Π½ΠΎΠΌ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΡΠΌΠ° Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ ΠΊΠΎΠΌΠ½Π°ΡΡ.
Π ΠΈΡΡΠ½ΠΎΠΊ 5.2 ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ ΠΊΠΎΠΌΠ½Π°ΡΡ
ΠΠ° Π΄Π°Π½Π½ΠΎΠΌ ΡΡΠ°ΠΏΠ΅ ΠΌΠΎΠΆΠ½ΠΎ ΡΠΊΠ°Π·Π°ΡΡ ΠΊΠΎΠ»ΠΈΡΠ΅ΡΡΠ²ΠΎ ΠΈΠ³ΡΠΎΠΊΠΎΠ² ΠΏΡΠΈΠ½ΠΈΠΌΠ°ΡΡΠΈΡ ΡΡΠ°ΡΡΠΈΠ΅ Π² ΠΈΠ³ΡΠ΅ ΠΈ ΡΠ°Π·ΠΌΠ΅Ρ ΠΌΠ°ΡΡΠΈΡΡ.
ΠΡΠΈ Π½Π°ΠΆΠ°ΡΠΈΠΈ ΠΊΠ½ΠΎΠΏΠΊΠΈ ΠΠ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠΎΡΠΌΠ° Π΄Π»Ρ Π²Π²ΠΎΠ΄Π° ΠΈΠΌΡΠ½ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΉ.
Π ΠΈΡΡΠ½ΠΎΠΊ 5.3. Π€ΠΎΡΠΌΠ° Π²Π²ΠΎΠ΄Π° ΠΈΠΌΡΠ½ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Π΅ΠΉ
ΠΠ°ΡΠ΅ΠΌ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ ΡΡΠ°ΡΡ ΠΈΠ³ΡΡ. ΠΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΠΌΠ°ΡΡΠΈΡΠ° Π΄Π»Ρ Π²ΡΠ±ΠΎΡΠ° Π±ΡΠΊΠ² ΠΈ Π²Π²ΠΎΠ΄Π° ΡΠ»ΠΎΠ².
Π ΠΈΡΡΠ½ΠΎΠΊ 5.4. ΠΡΠ±ΠΎΡ ΡΡΠ΅ΠΉΠΊΠΈ Π΄Π»Ρ Π²ΡΡΠ°Π²ΠΊΠΈ Π±ΡΠΊΠ²Ρ
Π ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠΈ Ρ ΠΏΡΠ°Π²ΠΈΠ»Π°ΠΌΠΈ ΠΌΠΎΠΆΠ½ΠΎ Π²ΡΠ±ΡΠ°ΡΡ ΡΠΎΠ»ΡΠΊΠΎ ΡΠΎΡΠ΅Π΄Π½ΡΡ ΡΡΠ΅ΠΉΠΊΡ Π΄Π»Ρ Π²ΡΡΠ°Π²ΠΊΠΈ Π±ΡΠΊΠ². ΠΠ°ΡΠ΅ΠΌ Ρ ΠΊΠ»Π°Π²ΠΈΠ°ΡΡΡΡ Π½Π°Π±ΠΈΡΠ°Π΅ΡΡΡ Π±ΡΠΊΠ²Π° ΠΈ Π½Π°ΠΆΠΈΠΌΠ°Π΅ΡΡΡ ΠΌΠ΅ΡΠΊΠ° «ΠΡΠΈΠ½ΡΡΡ».
ΠΠ°ΡΠ΅ΠΌ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ Π²ΡΠ±ΠΎΡ ΡΠ»ΠΎΠ²Π°.
Π ΠΈΡΡΠ½ΠΎΠΊ 5.5. ΠΡΠ±ΠΎΡ ΡΠ»ΠΎΠ²Π°
ΠΠ°ΡΠ΅ΠΌ ΡΠ»ΠΎΠ²ΠΎ ΠΎΠ΄ΠΎΠ±ΡΡΠ΅ΡΡΡ. Π₯ΠΎΠ΄ ΠΏΠ΅ΡΠ΅Ρ ΠΎΠ΄ΠΈΡ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ. Π’Π°ΠΊ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ ΠΏΠΎΠΊΠ° Π²ΡΡ ΠΌΠ°ΡΡΠΈΡΠ° Π½Π΅ ΡΡΠ°Π½ΠΎΠ²ΠΈΡΡΡ Π·Π°ΠΏΠΎΠ»Π½Π΅Π½Π½ΠΎΠΉ. ΠΠΎΡΠ»Π΅ ΡΡΠΎΠ³ΠΎ ΠΏΠΎΠ΄Π²ΠΎΠ΄ΠΈΡΡΡ ΠΈΡΠΎΠ³ ΠΈΠ³ΡΡ ΠΈ Π²ΡΠ²ΠΎΠ΄ΠΈΡΡΡ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΎ ΠΏΠΎΠ±Π΅Π΄ΠΈΡΠ΅Π»Π΅.
Π ΠΈΡΡΠ½ΠΎΠΊ 5.6. ΠΡΠ±ΠΎΡ ΡΠ»ΠΎΠ²Π°
ΠΠ°ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅
Π ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠ΅ ΡΠ°Π±ΠΎΡΡ Π½Π°Π΄ ΠΊΡΡΡΠΎΠ²ΡΠΌ ΠΏΡΠΎΠ΅ΠΊΡΠΎΠΌ Π±ΡΠ»ΠΎ ΡΠΎΠ·Π΄Π°Π½ΠΎ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΡΡΠ΅Π΄ΡΡΠ²ΠΎ, ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»ΡΡΡΠ΅Π΅ ΡΠΎΠ±ΠΎΠΉ ΡΠ΅ΡΠ΅Π²ΡΡ ΠΈΠ³ΡΡ «ΠΠ°Π»Π΄Π°». ΠΠ³ΡΠ° ΠΈΠΌΠ΅Π΅Ρ Π΄ΡΡΠΆΠ΅ΡΡΠ²Π΅Π½Π½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ, Π΄Π²Π° ΡΠ΅ΠΆΠΈΠΌΠ° ΡΠ°Π±ΠΎΡΡ, Π²ΡΡΠΎΠΊΡΡ Π½Π°Π΄ΡΠΆΠ½ΠΎΡΡΡ ΠΈ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎΡΡΡ.
Π‘ΡΠΎΠΈΡ ΠΎΡΠΌΠ΅ΡΠΈΡΡ, ΡΡΠΎ Π² Π΄Π°Π½Π½ΠΎΠΌ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ Π½Π΅ ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Ρ Π²ΡΠ΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΠΈ ΠΈΠ³ΡΡ «ΠΠ°Π»Π΄Π°», Π° ΡΠΎΠ»ΡΠΊΠΎ Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ Π²Π°ΠΆΠ½ΡΠ΅. Π’Π΅ΠΌ Π½Π΅ ΠΌΠ΅Π½Π΅Π΅ ΡΡΠΎΠ³ΠΎ Π½Π°Π±ΠΎΡΠ° Ρ Π²Π°ΡΠ°Π΅Ρ Π΄Π»Ρ ΠΏΠΎΠ»Π½ΠΎΡΠ΅Π½Π½ΠΎΠΉ ΡΠ°Π±ΠΎΡΡ Ρ ΠΈΠ³ΡΠΎΠΉ.
Π Ρ ΠΎΠ΄Π΅ ΡΠ°Π±ΠΎΡΡ Π½Π°Π΄ ΠΊΡΡΡΠΎΠ²ΡΠΌ ΠΏΡΠΎΠ΅ΠΊΡΠΎΠΌ ΠΌΠ½ΠΎΠΉ Π±ΡΠ»ΠΈ ΠΈΠ·ΡΡΠ΅Π½Ρ ΡΡΠ΅Π΄ΡΡΠ²Π° ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ.Net ΠΏΠΎ ΡΠ°Π±ΠΎΡΠ΅ Ρ ΡΠ΅ΡΡΡ ΠΈ ΠΏΠΎ ΡΠ°Π±ΠΎΡΠ΅ Ρ ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡΠΎΡΠ½ΡΠΌΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡΠΌΠΈ, Ρ.ΠΊ. ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΠΏΠΎΠ΄ΠΎΠ±Π½ΠΎΠ³ΠΎ ΡΠΈΠΏΠ° ΡΡΠ΅Π±ΡΠ΅Ρ ΠΏΠ°ΡΠ°Π»Π»Π΅Π»ΡΠ½ΠΎΠΉ ΡΠ°Π±ΠΎΡΡ Ρ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΈΠΌΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΠΌΠΈ, Π° ΡΠ°ΠΊΠΆΠ΅ ΡΠ΅Ρ Π½ΠΎΠ»ΠΎΠ³ΠΈΡ TCPClient ΠΈ TCPListener.
Π Ρ ΠΎΠ΄Π΅ ΡΠ°Π±ΠΎΡΡ ΡΠ°ΠΊ ΠΆΠ΅ ΡΠΊΡΠ΅ΠΏΠΈΠ» Π·Π½Π°Π½ΠΈΡ ΠΏΠΎ ΡΠ΅Ρ Π½ΠΎΠ»ΠΎΠ³ΠΈΡΠΌΠΈ.Net ΡΠ°ΠΊΠΈΠΌ, ΠΊΠ°ΠΊ WinForms, ΡΠ΅ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² Π² Xml.
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π±ΡΠ»ΠΎ ΡΠ΄Π΅Π»Π°Π½ΠΎ Π² ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠΈ Ρ ΠΏΡΠΈΠ½ΡΠΈΠΏΠ°ΠΌΠΈ ΠΠΠ. Π¨ΠΈΡΠΎΠΊΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π»Π°ΡΡ ΡΠΎΠ±ΡΡΠΈΠΉΠ½Π°Ρ ΠΌΠΎΠ΄Π΅Π»Ρ ΠΈ Π΄Π΅Π»Π΅Π³Π°ΡΡ.
Π‘ΠΏΠΈΡΠΎΠΊ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½Π½ΡΡ ΠΈΡΡΠΎΡΠ½ΠΈΠΊΠΎΠ²
1. ΠΠ΅ΡΠ±Π΅ΡΡ Π¨ΠΈΠ»Π΄Ρ. ΠΠΎΠ»Π½ΡΠΉ ΡΠΏΡΠ°Π²ΠΎΡΠ½ΠΈΠΊ ΠΏΠΎ Π‘# — Π.: ΠΠ·Π΄Π°ΡΠ΅Π»ΡΡΠΊΠΈΠΉ Π΄ΠΎΠΌ «ΠΠΈΠ»ΡΡΠΌΡ», 2004. — 752 Ρ.
2. ΠΠ½Π΄ΡΡ Π’ΡΠΎΠ΅Π»ΡΠ΅Π½. Π―Π·ΡΠΊ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΡ C# 2010 ΠΈ ΠΏΠ»Π°ΡΡΠΎΡΠΌΠ°.NET 4.0 — M.: ΠΠΈΠ»ΡΡΠΌΡ, 2010. —1392 c.
3. ΠΡΡΡΡ ΠΠ°ΠΊ-ΠΠΎΠ½Π°Π»ΡΠ΄ C# Π΄Π»Ρ ΠΏΡΠΎΡΠ΅ΡΡΠΈΠΎΠ½Π°Π»ΠΎΠ² - Π.: ΠΠ·Π΄Π°ΡΠ΅Π»ΡΡΠΊΠΈΠΉ Π΄ΠΎΠΌ «ΠΠΈΠ»ΡΡΠΌΡ», 2010. — 656 Ρ.
4. ΠΠΈΠΊΠΈΠΏΠ΅Π΄ΠΈΡ [ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠΉ ΡΠ΅ΡΡΡΡ]. — ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅. — Π Π΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://ru.wikipedia.org/wiki/
5. WPF — Windows Presentation Foundatin[ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠΉ ΡΠ΅ΡΡΡΡ]. — ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅. — Π Π΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://professorweb.ru/my/WPF/base_WPF/level1/info_WPF.php
6. Windows Presentation Foundation[ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠΉ ΡΠ΅ΡΡΡΡ]. — ΠΠ»Π΅ΠΊΡΡΠΎΠ½Π½ΡΠ΅ Π΄Π°Π½Π½ΡΠ΅. — Π Π΅ΠΆΠΈΠΌ Π΄ΠΎΡΡΡΠΏΠ°: http://msdn.microsoft.com/ru-ru/library/ms754130.aspx
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅
ΠΠΈΡΡΠΈΠ½Π³ ΠΊΠ»Π°ΡΡΠ° 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 (GameLogicControls, SettingsManager. DisplaySettings, gameLogicManager. LogicCells);
BindGameManagers ();
}
public void CancelSelectedWord ()
{
gameLogicManager.CancelSelectedWord ();
}
public void AcceptLetter ()
{
gameLogicManager.AcceptLetter ();
}
public void CancelLetter ()
{
gameLogicManager.CancelLetter ();
}
public void AcceptWord ()
{
gameLogicManager.AcceptWord ();
}
public void CreateGameRoom (String userName)
{
IsProcessServer = true;
ProcessUserName = userName;
networkManager.CreateGameRoom ();
networkManager.ConnectToServer («localhost», userName);
}
public void ConnectToRoom (String ipString, String userName)
{
networkManager.ConnectToServer (ipString, userName);
networkManager.SendUserInformation (userName);
}
public void ConfigureGameParameters (List players, int size)
{
var gameLogicSettings = new GameSettings
{
MatrixSize = size,
PlayerCount = players. Count
};
var settingsManager = new SettingsManager
{
GameLogicSettings = gameLogicSettings,
DisplaySettings = new DisplaySettings
{
cellBackgroundColor = Color. Black,
cellBorderColor = Color. Chartreuse,
selectedCellBackroundColor = Color. Bisque,
cellLetterColor = Color. DarkOrange,
StartWorldTextColor = Color. Aqua,
MatrixCellSize = 360 / gameLogicSettings. MatrixSize — 2,
MatrixCellBorderWidth = 2
}
};
SettingsManager = settingsManager;
ConfigureGame ();
Players = players;
MainForm.CreateAllPlayersNameControls ();
}
}
}
public abstract class FtpCommandParserBase
{
protected readonly Dictionary> CommandHandlers =
new Dictionary>
{
{ FtpCommand. Abor, (parser, s) => parser. AborCommandHandler (s) },
{ FtpCommand. Cdup, (parser, s) => parser. CdupCommandHandler (s) },
{ FtpCommand. Cwd, (parser, s) => parser. CwdCommandHandler (s) },
{ FtpCommand. Dele, (parser, s) => parser. DeleCommandHandler (s) },
{ FtpCommand. List, (parser, s) => parser. ListCommandHandler (s) },
{ FtpCommand. Mdtm, (parser, s) => parser. MdtmCommandHandler (s) },
{ FtpCommand. Mkd, (parser, s) => parser. MkdCommandHandler (s) },
{ FtpCommand. Nlst, (parser, s) => parser. NlstCommandHandler (s) },
{ FtpCommand. Noop, (parser, s) => parser. NoopCommandHandler (s) },
{ FtpCommand. Pass, (parser, s) => parser. PassCommandHandler (s) },
{ FtpCommand. Pasv, (parser, s) => parser. PasvCommandHandler (s) },
{ FtpCommand. Port, (parser, s) => parser. PortCommandHandler (s) },
{ FtpCommand. Pwd, (parser, s) => parser. PwdCommandHandler (s) },
{ FtpCommand. Quit, (parser, s) => parser. QuitCommandHandler (s) },
{ FtpCommand. Rein, (parser, s) => parser. ReinCommandHandler (s) },
{ FtpCommand. Retr, (parser, s) => parser. RetrCommandHandler (s) },
{ FtpCommand. Rmd, (parser, s) => parser. RmdCommandHandler (s) },
{ FtpCommand. Rnfr, (parser, s) => parser. RnfrCommandHandler (s) },
{ FtpCommand. Rnto, (parser, s) => parser. RntoCommandHandler (s) },
{ FtpCommand. Size, (parser, s) => parser. SizeCommandHandler (s) },
{ FtpCommand. Stor, (parser, s) => parser. StorCommandHandler (s) },
{ FtpCommand. Stou, (parser, s) => parser. StouCommandHandler (s) },
{ FtpCommand. User, (parser, s) => parser. UserCommandHandler (s) }
};
#region Command delegates
public virtual Action AborCommand { get; set; }
public virtual Action CdupCommand { get; set; }
public virtual Action CwdCommand { get; set; }
public virtual Action DeleCommand { get; set; }
public virtual Action ListCommand { get; set; }
public virtual Action MdtmCommand { get; set; }
public virtual Action MkdCommand { get; set; }
public virtual Action NlstCommand { get; set; }
public virtual Action NoopCommand { get; set; }
public virtual Action PassCommand { get; set; }
public virtual Action PasvCommand { get; set; }
public virtual Action PortCommand { get; set; }
public virtual Action PwdCommand { get; set; }
public virtual Action QuitCommand { get; set; }
public virtual Action ReinCommand { get; set; }
public virtual Action RetrCommand { get; set; }
public virtual Action RmdCommand { get; set; }
public virtual Action RnfrCommand { get; set; }
public virtual Action RntoCommand { get; set; }
public virtual Action SizeCommand { get; set; }
public virtual Action StorCommand { get; set; }
public virtual Action StouCommand { get; set; }
public virtual Action UserCommand { get; set; }
#endregion
#region Command handlers
protected abstract void AborCommandHandler (string parameters);
protected abstract void CdupCommandHandler (string parameters);
protected abstract void CwdCommandHandler (string parameters);
protected abstract void DeleCommandHandler (string parameters);
protected abstract void ListCommandHandler (string parameters);
protected abstract void MdtmCommandHandler (string parameters);
protected abstract void MkdCommandHandler (string parameters);
protected abstract void NlstCommandHandler (string parameters);
protected abstract void NoopCommandHandler (string parameters);
protected abstract void PassCommandHandler (string parameters);
protected abstract void PasvCommandHandler (string parameters);
protected abstract void PortCommandHandler (string parameters);
protected abstract void PwdCommandHandler (string parameters);
protected abstract void QuitCommandHandler (string parameters);
protected abstract void ReinCommandHandler (string parameters);
protected abstract void RetrCommandHandler (string parameters);
protected abstract void RmdCommandHandler (string parameters);
protected abstract void RnfrCommandHandler (string parameters);
protected abstract void RntoCommandHandler (string parameters);
protected abstract void SizeCommandHandler (string parameters);
protected abstract void StorCommandHandler (string parameters);
protected abstract void StouCommandHandler (string parameters);
protected abstract void UserCommandHandler (string parameters);
#endregion
#region Methods
public abstract void Parse (string message);
#endregion
}
public class FtpCommandParser: FtpCommandParserBase
{
#region Fields
private readonly Action _onUnsupportedCommand;
#endregion
#region ctor
public FtpCommandParser (Action onUnsupportedCommandAction = null)
{
if (onUnsupportedCommandAction == null)
_onUnsupportedCommand = c => { throw new UnsupportedFtpCommandException (c); };
else
_onUnsupportedCommand = onUnsupportedCommandAction;
}
#endregion
#region Methods
#region Public methods
public override void Parse (string message)
{
message = message. Trim (' ', 'n', 'r', 't');
if (string.IsNullOrEmpty (message))
return;
string[] parts = message. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
FtpCommand ftpCommand;
if (!FtpCommandHelper.Commands.TryGetValue (parts[0], out ftpCommand))
throw new UnknownFtpCommandException (parts[0]);
CommandHandlers[ftpCommand](this, string. Join (««, parts. Skip (1)));
}
#endregion
#region Private methods
private void InvokeCommand (FtpCommand command, Action commandAction)
{
if (commandAction≠ null)
commandAction ();
else
_onUnsupportedCommand (command);
}
private void InvokeCommand (FtpCommand command, Action commandAction, string parameter)
{
if (commandAction≠ null)
{
if (parameter == null)
throw new IncorrectFtpCommandFormatException (command);
commandAction (parameter);
}
else
_onUnsupportedCommand (command);
}
#endregion
#region FtpCommandParserBase
#region Command handlers
protected override void AborCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Abor, AborCommand);
}
protected override void CdupCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Cdup, CdupCommand);
}
protected override void CwdCommandHandler (string parameters)
{
string[] args = parameters. Split (new []{' '}, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Cwd, CwdCommand, args. Length > 0? args[0]: null);
}
protected override void DeleCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Dele, DeleCommand, args. Length > 0? args[0]: null);
}
protected override void ListCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.List, ListCommand, args. Length > 0? args[0]: string. Empty);
}
protected override void MdtmCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Mdtm, MdtmCommand, args. Length > 0? args[0]: null);
}
protected override void MkdCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Mkd, MkdCommand, args. Length > 0? args[0]: null);
}
protected override void NlstCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Nlst, NlstCommand, args. Length > 0? args[0]: string. Empty);
}
protected override void NoopCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Noop, NoopCommand);
}
protected override void PassCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Pass, PassCommand, args. Length > 0? args[0]: null);
}
protected override void PasvCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Pasv, PasvCommand);
}
protected override void PortCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] {','}, StringSplitOptions. RemoveEmptyEntries);
if (args.Length < 6)
throw new IncorrectFtpCommandFormatException (FtpCommand.Port);
if (PortCommand == null)
{
_onUnsupportedCommand (FtpCommand.Port);
return;
}
long address = 0;
int port = 0;
for (int i = 0; i < 6; i++)
{
byte part;
if (!byte.TryParse (args[i], out part))
throw new IncorrectFtpCommandFormatException (FtpCommand.Port);
if (i < 4)
address += part << (8 * i);
else
port = port * 256 + part;
}
PortCommand (address, port);
}
protected override void PwdCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Pwd, PwdCommand);
}
protected override void QuitCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Quit, QuitCommand);
}
protected override void ReinCommandHandler (string parameters)
{
InvokeCommand (FtpCommand.Rein, ReinCommand);
}
protected override void RetrCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Retr, RetrCommand, args. Length > 0? args[0]: null);
}
protected override void RmdCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Rmd, RmdCommand, args. Length > 0? args[0]: null);
}
protected override void RnfrCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Rnfr, RnfrCommand, args. Length > 0? args[0]: null);
}
protected override void RntoCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Rnto, RntoCommand, args. Length > 0? args[0]: null);
}
protected override void SizeCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Size, SizeCommand, args. Length > 0? args[0]: null);
}
protected override void StorCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Stor, StorCommand, args. Length > 0? args[0]: null);
}
protected override void StouCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.Stou, StouCommand, args. Length > 0? args[0]: string. Empty);
}
protected override void UserCommandHandler (string parameters)
{
string[] args = parameters. Split (new[] { ' ' }, StringSplitOptions. RemoveEmptyEntries);
InvokeCommand (FtpCommand.User, UserCommand, args. Length > 0? args[0]: null);
}
#endregion
#endregion
#endregion
}
ΠΠΈΡΡΠΈΠ½Π³ ΠΊΠ»Π°ΡΡΠ° FileSystemWorker. cs
public class FileSystemWorker
{
private readonly string _rootDirectory;
private UserRights _userRights;
private FileStream _savingFile;
private FileStream _readingFile;
public const int BufferSize = 1 048 576; //1MB
public FileSystemWorker (string rootDirectory)
{
if (!Directory.Exists (rootDirectory))
throw new DirectoryNotFoundException (rootDirectory);
_rootDirectory = Path. GetFullPath (rootDirectory);
Directory.SetCurrentDirectory (_rootDirectory);
}
public void InitUserRights (UserRights userRights)
{
_userRights = userRights;
}
public void GoToParentDirectory ()
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string currentPath = CheckAndGetCurrentDirectory ();
if (string.Compare (_rootDirectory, currentPath, StringComparison. OrdinalIgnoreCase)≠ 0)
Directory.SetCurrentDirectory (Directory.GetParent (currentPath).FullName);
}
public void GoToRootDirectory ()
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
Directory.SetCurrentDirectory (_rootDirectory);
}
public void ChangeDirecroty (string directory)
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string newPath = Path. Combine (CheckAndGetCurrentDirectory (), directory. TrimStart (new [] { '\', '/' }));
if (!Directory.Exists (newPath))
throw new FileSystemAccessDeniedException ();
Directory.SetCurrentDirectory (newPath);
}
public string CreateDirectory (string directory)
{
if (!_userRights.CanCreate ())
throw new FileSystemAccessDeniedException ();
string path = Path. Combine (CheckAndGetCurrentDirectory (), directory. TrimStart (new[] { '\', '/' }));
if (Directory.Exists (path))
throw new FileSystemException (string.Format («Directory „{0}“ already exists», directory));
try
{
Directory.CreateDirectory (path);
}
catch (IOException ex)
{
throw new FileSystemException (ex.Message.Replace (_rootDirectory, «»));
}
return path. Replace (_rootDirectory, «»);
}
public void RemoveDirectory (string directory)
{
if (!_userRights.CanCreate ())
throw new FileSystemAccessDeniedException ();
string path = Path. Combine (CheckAndGetCurrentDirectory (), directory. TrimStart (new[] { '\', '/' }));
try
{
Directory.Delete (path);
}
catch (IOException)
{
throw new FileSystemAccessDeniedException ();
}
}
public string GetCurrentDirectory ()
{
string path = CheckAndGetCurrentDirectory ().Replace (_rootDirectory, «»);
return Path. IsPathRooted (path)? path: «» + path;
}
public void DeleteFile (string fileName)
{
if (!_userRights.CanCreate ())
throw new FileSystemAccessDeniedException ();
string filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new [] { '\', '/' }));
if (!File.Exists (filePath))
throw new FileSystemAccessDeniedException ();
try
{
File.Delete (filePath);
}
catch (IOException ex)
{
throw new FileSystemException (ex.Message.Replace (_rootDirectory, «»));
}
}
public void RenameFile (string fileName, string newFileName)
{
if (!_userRights.CanCreate ())
throw new FileSystemAccessDeniedException ();
string oldFilePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new[] { '\', '/' }));
if (!File.Exists (oldFilePath))
throw new FileSystemAccessDeniedException ();
string newFilePath = Path. Combine (CheckAndGetCurrentDirectory (), newFileName. TrimStart (new[] { '\', '/' }));
if (File.Exists (newFilePath))
throw new FileSystemException (string.Format («File „{0}“ already exists», newFileName));
try
{
File.Move (oldFilePath, newFilePath);
}
catch (IOException ex)
{
throw new FileSystemException (ex.Message.Replace (_rootDirectory, «»));
}
}
public string BeginWriteFile (string fileName, bool newNameIfExists = false)
{
if (_savingFile≠ null)
throw new Exception («Previous file not saved»);
if (!_userRights.CanUpload ())
throw new FileSystemAccessDeniedException ();
string filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new [] { '\', '/' }));
if (File.Exists (filePath) || string. IsNullOrWhiteSpace (fileName))
{
if (!newNameIfExists)
throw new FileSystemAccessDeniedException ();
fileName = Guid. NewGuid ().ToString ().Substring (0, 8);
filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new [] { '\', '/' }));
}
_savingFile = new FileStream (filePath, FileMode. CreateNew, FileAccess. Write, FileShare. None, BufferSize,
FileOptions.SequentialScan);
return fileName;
}
public void WriteData (byte[] data, int size)
public void EndWriteFile ()
{
if (_savingFile == null)
throw new Exception («File not opened»);
_savingFile.Close ();
_savingFile = null;
}
public void BeginReadFile (string fileName)
{
if (_readingFile≠ null)
throw new Exception («Previous file not closed»);
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new[] { '\', '/' }));
if (!File.Exists (filePath))
throw new FileSystemAccessDeniedException ();
_readingFile = new FileStream (filePath, FileMode. Open, FileAccess. Read, FileShare. Read, BufferSize,
FileOptions.SequentialScan);
}
public int ReadData (byte[] buffer, int size)
if (_readingFile == null
public void EndReadFile ()
{
if (_readingFile == null)
throw new Exception («File not opened»);
_readingFile.Close ();
_readingFile = null;
}
public bool FileExists (string fileName)
{
return File. Exists (Path.Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new[] { '\', '/' })));
}
public bool CanRenameFile ()
{
return _userRights.CanCreate ();
}
public bool CanUploadFile ()
{
return _userRights.CanUpload ();
}
public bool CanDownloadFile ()
{
return _userRights.CanDownload ();
}
public DateTime GetFileModifiedDate (string fileName)
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new[] { '\', '/' }));
if (!File.Exists (filePath))
throw new FileSystemAccessDeniedException ();
return File. GetLastWriteTime (filePath);
}
public long GetFileSize (string fileName)
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string filePath = Path. Combine (CheckAndGetCurrentDirectory (), fileName. TrimStart (new[] { '\', '/' }));
if (!File.Exists (filePath))
throw new FileSystemAccessDeniedException ();
try
{
return new FileInfo (filePath).Length;
}
catch (IOException ex)
{
throw new FileSystemException (ex.Message.Replace (_rootDirectory, «»));
}
}
public string[] GetFileInfo (string fileName, bool onlyNames = false)
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
List files = new List ();
List directories = new List ();
string currentDirectory = CheckAndGetCurrentDirectory ();
string filePath = string. IsNullOrWhiteSpace (fileName)
? currentDirectory
: Path. Combine (currentDirectory, fileName. TrimStart (new[] {'\', '/'}));
if (File.Exists (filePath))
{
files.Add (new FileInfo (filePath));
}
else if (Directory.Exists (filePath))
{
files.AddRange (Directory.GetFiles (filePath).Select (v => new FileInfo (v)));
directories.AddRange (Directory.GetDirectories (filePath).Select (v => new DirectoryInfo (v)));
}
else
{
throw new FileSystemAccessDeniedException ();
}
Func getFileInfo;
Func getDirectoryInfo;
if (onlyNames)
{
getFileInfo =
f => string. Format («t{0}», f.Name.Replace (_rootDirectory, «»));
getDirectoryInfo =
d => string. Format («dirt{0}», d.Name.Replace (_rootDirectory, «»));
}
else
{
getFileInfo =
f => string. Format («t{0}t{1}t{2}», f.Name.Replace (_rootDirectory, «»), f. Length, f. LastWriteTime);
getDirectoryInfo =
d => string. Format («dirt{0}t{1}t{2}», d.Name.Replace (_rootDirectory, «»), «», d. LastWriteTime);
}
List result = new List ();
result.AddRange (
files.Select (
v => getFileInfo (v)));
result.AddRange (
directories.Select (
v => getDirectoryInfo (v)));
return result. ToArray ();
}
private string CheckAndGetCurrentDirectory ()
{
if (!_userRights.CanDownload ())
throw new FileSystemAccessDeniedException ();
string currentDirectory = Directory. GetCurrentDirectory ();
if (!currentDirectory.StartsWith (_rootDirectory))
throw new Exception («Incorrect working directory»);
return currentDirectory;
}
}
ΠΠΈΡΡΠΈΠ½Π³ ΠΊΠ»Π°ΡΡΠ° DisplayManager
using System;
using System.Collections.Generic;
using System. Drawing;
using System.Drawing.Drawing2D;
using System. Linq;
using System. Text;
using System.Windows.Forms;
using BaldaClient. DisplayModel;
using BaldaGameLogic. GameLogic;
using BaldaGameLogic. GameModel;
namespace BaldaClient. DisplayLogic
{
public class DisplayManager
{
#region Properties for bindings
public GameLogicControls GameControls { get; set; }
#endregion
#region gameLogicFields
private List logicCells;
private List displayCells;
private DisplayCell previousSelectedCell;
private Dictionary cellDictionary;
#endregion
#region forDisplayFields
private int cellBackgroundOffset;
private int cellBackgroundSize;
private int cellTextOffset;
private PictureBox pb;
private Graphics gr;
private Pen pen;
private Brush primaryBrush;
private Brush lightBrush;
private Brush textBrush;
private Font font;
private Label selectedWordLabel;
private DisplaySettings displaySettings;
#endregion
private DisplayCell selectedCellForLetter;
public LogicCell SelectedCellForLetter
{
get { return (selectedCellForLetter≠ null)? selectedCellForLetter. LogicCell: null; }
}
public DisplayManager (GameLogicControls gameLogicControls, DisplaySettings displaySettings, List logiccells)
{
this.GameControls = gameLogicControls;
this.pb = gameLogicControls. pictureBox;
this.selectedWordLabel = gameLogicControls. SelectedWordLabel;
pb.Refresh ();
gr = pb. CreateGraphics ();
this.displaySettings = displaySettings;
pen = new Pen (displaySettings.cellBorderColor, displaySettings. MatrixCellBorderWidth);
primaryBrush = new SolidBrush (displaySettings.cellBackgroundColor);
lightBrush = new SolidBrush (displaySettings.selectedCellBackroundColor);
textBrush = new SolidBrush (displaySettings.cellLetterColor);
font = new Font (FontFamily.GenericMonospace, (displaySettings.MatrixCellSize / 2), FontStyle. Bold);
cellBackgroundOffset = displaySettings. MatrixCellBorderWidth/2;
cellBackgroundSize = displaySettings. MatrixCellSize — displaySettings. MatrixCellBorderWidth;
cellTextOffset = displaySettings. MatrixCellBorderWidth/2 + 6;
logicCells = logiccells;
CreateDisplayCells ();
}
private void CreateDisplayCells ()
{
displayCells = new List ();
cellDictionary = new Dictionary ();
logicCells.ForEach (lc =>
{
var dispayCell = new DisplayCell
{
LogicCell = lc,
offsetX = (lc.X — 1)*displaySettings.MatrixCellSize + cellBackgroundOffset,
offsetY = (lc.Y — 1)*displaySettings.MatrixCellSize + cellBackgroundOffset,
};
displayCells.Add (dispayCell);
cellDictionary.Add (lc, dispayCell);
});
}
public void DrawCell (DisplayCell cell, Brush backGroundBrush)
{
try
{
if (cell≠ null)
{
gr.DrawRectangle (pen, cell. offsetX, cell. offsetY, displaySettings. MatrixCellSize, displaySettings. MatrixCellSize);
gr.FillRectangle (backGroundBrush, cell. offsetX + cellBackgroundOffset, cell. offsetY + cellBackgroundOffset,
cellBackgroundSize, cellBackgroundSize);
if (!String.IsNullOrEmpty (cell.LogicCell.Letter))
gr.DrawString (cell.LogicCell.Letter, font, textBrush, cell. offsetX + cellTextOffset,
cell.offsetY + cellTextOffset);
}
}
catch (Exception ex)
{
throw ex;
}
}
public void DrawLightCell (DisplayCell cell)
{
}
public void DrawFullMatrix ()
{
displayCells.ForEach (cell => DrawCell (cell, primaryBrush));
}
public void DisplayCells (List logCells)
{
logCells.ForEach (lc=> DrawCell (cellDictionary[lc], primaryBrush));
}
public void DisplayCellsAsLight (List logCells)
{
logCells.ForEach (lc => DrawCell (cellDictionary[lc], lightBrush));
}
public bool SelectCellForInsertingLetter (int xCor, int yCor)
{
if (previousSelectedCell≠ null)
{
DrawCell (previousSelectedCell, primaryBrush);
}
LightCellByCor (xCor, yCor);
return true;
}
private void LightCellByCor (int xCor, int yCor)
{
var cell = GetDisplayCellByCor (xCor, yCor);
previousSelectedCell = cell;
DrawCell (cell, lightBrush);
}
private DisplayCell GetDisplayCellByCor (int xCor, int yCor)
{
var logicX = xCor / displaySettings. MatrixCellSize + 1;
var logicY = yCor / displaySettings. MatrixCellSize + 1;
return GetCellByLogicCor (logicX, logicY);
}
private DisplayCell GetCellByLogicCor (int x, int y)
{
return displayCells. FirstOrDefault (cell => (cell.LogicCell.X == x) && (cell.LogicCell.Y == y));
}
public LogicCell GetLogicCellByCor (int x, int y)
{
var logicX = x / displaySettings. MatrixCellSize + 1;
var logicY = y / displaySettings. MatrixCellSize + 1;
var displayCell = GetCellByLogicCor (logicX, logicY);
return (displayCell≠null)? displayCell. LogicCell: null;
}
public void DispalyCurrentWord (string message)
{
selectedWordLabel.Text = message;
}
public void DisplayCurrentPlayerName (string message)
{
GameControls.CurrentPlayerLabel.Text = message;
}
public void DisplayCurrentGuide (string message)
{
GameControls.GuideLabel.Text = message;
}
public void DisplayCurrentError (string message)
{
GameControls.ErrorLabel.Text = message;
}
}
}
using System;
using System.Collections.Generic;
using System. IO;
using System. Linq;
using System.Net;
using System.Net.Sockets;
using System. Text;
using System. Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
public delegate void HandleMassageActivity (String message);
namespace BaldaClient. NetworkModel
{
public class NetworkClient: IDisposable
{
private StreamWriter swSender;
private StreamReader srReceiver;
private TcpClient tcpServer;
private delegate void UpdateLogCallback (string strMessage);
private delegate void CloseConnectionCallback (string strReason);
private Thread thrMessaging;
private IPAddress ipAddr;
private bool Connected;
private HandleMassageActivity HandleMessage;
public NetworkClient (HandleMassageActivity handleMessage)
{
this.HandleMessage = handleMessage;
}
public void ConnectToServer (String ipString, String userName)
{
if (Connected == false)
{
InitializeConnection (ipString, userName);
}
else
{
CloseConnection («Disconnected at user’s request.»);
}
}
private void InitializeConnection (String ipString, String userName)
{
tcpServer = new TcpClient ();
tcpServer.Connect («localhost», 1986);
Connected = true;
swSender = new StreamWriter (tcpServer.GetStream ());
swSender.WriteLine (userName);
swSender.Flush ();
thrMessaging = new Thread (new ThreadStart (ReceiveMessages));
thrMessaging.Start ();
}
private void ReceiveMessages ()
{
srReceiver = new StreamReader (tcpServer.GetStream ());
string ConResponse = srReceiver. ReadLine ();
if (ConResponse[0] == '1')
{
UpdateLog («Connected Successfully!»);
}
else
{
string Reason = «Not Connected: «;
Reason += ConResponse. Substring (2, ConResponse. Length — 2);
UpdateLog (Reason);
return;
}
while (Connected)
{
var newMessage = srReceiver. ReadLine ();
HandleMessage (newMessage);
}
}
private void UpdateLog (string strMessage)
{
Console.WriteLine (strMessage);
}
private void CloseConnection (string Reason)
{
Connected = false;
swSender.Close ();
srReceiver.Close ();
tcpServer.Close ();
}
public void SendMessage (String message)
{
swSender.WriteLine (message);
swSender.Flush ();
}
public void Dispose ()
{
if (Connected == true)
{
Connected = false;
swSender.Close ();
srReceiver.Close ();
tcpServer.Close ();
}
}
}
}
using System;
using System.Collections.Generic;
using System. Linq;
using System. Text;
using BaldaGameLogic. Delegates;
using BaldaGameLogic. GameModel;
namespace BaldaGameLogic. GameLogic
{
public class GameLogicManager
{
public GameSettings Settings { get; set; }
public List LogicCells { get; private set; }
public List MainWordLogicCells { get; private set; }
private LogicCell selectedCell;
public List Players { get; set; }
private List SelectedCellsForWord;
private String selectedWord { get; set; }
public PlayerGameStatistic GameStatistic { get; set; }
private Player activePlayer;
#region GameLogicFlags
public bool IsCellSelectionExpected { get; set; }
public bool IsLetterSelectionExpected { get; set; }
public bool IsWordSelectionExpected { get; set; }
public bool IsSelectedNetworkGameMode { get; set; }
public bool IsWordSelected { get; set; }
private bool IsPreviousInvalid;
#endregion
#region GameLogicDelegates
public DisplayMatrixCells DisplayCells { private get; set; }
public DisplayMatrixCells DisplayCellAsLight { private get; set; }
public DisplayMessage DisplayCurrentWord { private get; set; }
public DisplayMessage DisplayCurrentPlayerName { private get; set; }
public DisplayMessage DisplayCurrentGuide { private get; set; }
public DisplayMessage DisplayCurrentError { private get; set; }
public DispalyAction AddWordConfirmationButtons { private get; set; }
public DispalyAction RemoveConfirmationLabels { private get; set; }
public DispalyAction AddLetterConfirmationButtons { private get; set; }
public ConditionAction IsWordExist { private get; set; }
#endregion
public void CreateGameLogicObjects ()
{
CreateLogicCells ();
CreatePlayersObjects ();
SelectedCellsForWord = new List ();
}
private void CreatePlayersObjects ()
{
Players = new List ();
for (int i = 1; i <= Settings. PlayerCount; i++)
{
Players.Add (new Player {Number = i, Name = String. Empty});
}
GameStatistic = new PlayerGameStatistic (Players);
}
private void CreateLogicCells ()
{
LogicCells = new List ();
for (int i = 1; i <= Settings. MatrixSize; i++)
{
for (int j = 1; j <= Settings. MatrixSize; j++)
{
LogicCells.Add (new LogicCell
{
X = i,
Y = j,
Letter = String. Empty
});
}
}
var middleRowIndex = Settings. MatrixSize / 2 + 1;
MainWordLogicCells = new List ();
LogicCells.Where (cell => cell. Y == middleRowIndex)
.ToList ()
.ForEach (cell => { MainWordLogicCells. Add (cell);
cell.IsMainWorldCell = true;
});
}
public void SetFirstWord (String mainWord)
{
if (mainWord.Length≠ Settings. MatrixSize)
{
throw new Exception («Start wold more then matrix size»);
}
var mainWorldBuilder = new StringBuilder (mainWord);
for (int i = 0; i < Settings. MatrixSize; i++)
{
MainWordLogicCells[i]. Letter = mainWorldBuilder[i]. ToString ();
DisplayCells (MainWordLogicCells);
}
}
public void StartGame ()
{
activePlayer = Players. First (pl => pl. Number == 1);
SetCellCelectionStage ();
}
public bool TrySelectCellForInsertingLetter (LogicCell logCell)
{
if (!String.IsNullOrEmpty (logCell.Letter))
{
DisplayCurrentError (GamePlayMessages.CellMustBeEmpty);
return false;
}
if (!IsOneOfNeigborsContainsLetter (logCell))
{
DisplayCurrentError (GamePlayMessages.NeighborMustContainLetter);
return false;
}
selectedCell = logCell;
DisplayCellAsLight (new List { logCell });
DisplayCurrentError (String.Empty);
DisplayCurrentGuide (GamePlayMessages.InsertLetter);
return true;
}
public bool LetterIsValidForInserting (string letter)
{
return true;
}
public void SetLetterToCell (string letter)
{
selectedCell.Letter = letter;
IsLetterSelectionExpected = false;
IsWordSelectionExpected = false;
DisplayCells (new List{selectedCell});
DisplayCurrentWord (letter);
SetAcceptLetterStage ();
}
public bool IsLogicCellValidForWordSelection (LogicCell logCell)
{
if (SelectedCellsForWord≠ null)
{
if (String.IsNullOrEmpty (logCell.Letter))
{
IsPreviousInvalid = true;
return false;
}
if (SelectedCellsForWord.Contains (logCell) && (SelectedCellsForWord.Last ()≠ logCell))
{
{
HandleDoubleCellInWordSelection (logCell);
IsPreviousInvalid = false;
DisplayCurrentWord (GetCurentSelectedWord ());
}
return false;
}
if (SelectedCellsForWord.Contains (logCell) && (SelectedCellsForWord.Last () == logCell))
{
return false;
}
if (SelectedCellsForWord.Count≠ 0)
{
if (!IsLogicCellsNeighbors (logCell, SelectedCellsForWord. Last ()))
{
return false;
}
}
}
return true;
}
private bool IsLogicCellsNeighbors (LogicCell firstCell, LogicCell secondCell)
{
if ((firstCell == null) || (secondCell == null))
{
return false;
}
var neighbors = GetNeighborsForCell (firstCell);
return neighbors. Contains (secondCell);
}
private List GetNeighborsForCell (LogicCell logicCell)
{
var high = GetCellByLogicCor (logicCell.X, logicCell. Y + 1);
var low = GetCellByLogicCor (logicCell.X, logicCell. Y — 1);
var left = GetCellByLogicCor (logicCell.X — 1, logicCell. Y);
var right = GetCellByLogicCor (logicCell.X + 1, logicCell. Y);
var list = new List ();
if (high≠null) list. Add (high);
if (low≠ null) list. Add (low);
if (left≠ null) list. Add (left);
if (right≠ null) list. Add (right);
return list;
}
private bool IsOneOfNeigborsContainsLetter (LogicCell logicCell)
{
var flag=false;
GetNeighborsForCell (logicCell).ForEach (lc =>
{
if (lc≠ null)
{
if (!String.IsNullOrEmpty (lc.Letter))
{
flag = true;
}
}
});
return flag;
}
private LogicCell GetCellByLogicCor (int x, int y)
{
return LogicCells. FirstOrDefault (lc => (lc.X == x) && (lc.Y == y));
}
private void HandleDoubleCellInWordSelection (LogicCell cell)
{
var index = SelectedCellsForWord. IndexOf (cell);
var temp = SelectedCellsForWord. Take (index+1).ToList ();
for (int i = index+1; i < SelectedCellsForWord. Count; i++)
{
DisplayCells (new List{SelectedCellsForWord[i]});
}
SelectedCellsForWord = temp;
}
public void AddCellToWordSelection (LogicCell logicCell)
{
SelectedCellsForWord.Add (logicCell);
DisplayCellAsLight (new List (){logicCell});
DisplayCurrentWord (GetCurentSelectedWord ());
}
private string GetCurentSelectedWord ()
{
var selectedWord = String. Empty;
SelectedCellsForWord.ForEach (cell=>selectedWord += cell. Letter);
return selectedWord;
}
public void StopWordSelection ()
{
if (IsSelectedWordContainsSelectedCell ())
{
SetAcceptWordStage ();
}
else
{
DisplayCurrentError (GamePlayMessages.WordMustContainSelectedCell);
}
}
private bool IsSelectedWordContainsSelectedCell ()
{
if (SelectedCellsForWord≠ null)
{
if (SelectedCellsForWord.Count≠ 0)
{
if (selectedCell≠ null)
{
return SelectedCellsForWord. Contains (selectedCell);
}
}
}
return false;
}
#region GamePlayAction
public void CancelSelectedWord ()
{
RemoveConfirmationLabels ();
DisplayCells (SelectedCellsForWord);
SelectedCellsForWord = null;
selectedWord = String. Empty;
SetAcceptLetterStage ();
}
public void CancelLetter ()
{
selectedCell.Letter = String. Empty;
DisplayCells (new List{selectedCell});
selectedCell = null;
SetCellCelectionStage ();
}
public void AcceptLetter ()
{
SetWordSelectionStage ();
}
public void AcceptWord ()
{
GameStatistic.SetWordToPlayer (activePlayer, selectedWord);
RemoveConfirmationLabels ();
DisplayCells (SelectedCellsForWord);
SelectedCellsForWord = null;
SetNextActivePlayer ();
SetCellCelectionStage ();
}
#endregion
#region SetGamePlayStage
private void SetWordSelectionStage ()
{
RemoveConfirmationLabels ();
SelectedCellsForWord = new List ();
IsWordSelectionExpected = true;
DisplayCurrentWord (String.Empty);
DisplayCurrentGuide (GamePlayMessages.SelectWord);
DisplayCurrentError (String.Empty);
}
private void SetCellCelectionStage ()
{
RemoveConfirmationLabels ();
IsCellSelectionExpected = true;
DisplayCurrentPlayerName (activePlayer.Name);
DisplayCurrentGuide (GamePlayMessages.SelectCellForLetter);
DisplayCurrentError (String.Empty);
DisplayCurrentWord (String.Empty);
}
private void SetAcceptLetterStage ()
{
RemoveConfirmationLabels ();
AddLetterConfirmationButtons ();
DisplayCurrentWord (selectedCell.Letter);
DisplayCurrentGuide (GamePlayMessages.AcceptLetter);
DisplayCurrentError (String.Empty);
}
private void SetAcceptWordStage ()
{
IsWordSelectionExpected = false;
selectedWord = GetCurentSelectedWord ();
DisplayCurrentWord (selectedWord);
DisplayCurrentError (String.Empty);
DisplayCurrentGuide (GamePlayMessages.AcceptWord);
AddWordConfirmationButtons ();
}
#endregion
private void SetNextActivePlayer ()
{
var index = Players. IndexOf (activePlayer);
if (index == (Players.Count — 1))
{
activePlayer = Players. First ();
}
else
{
activePlayer = Players[index + 1];
}
DisplayCurrentPlayerName (activePlayer.Name);
}
}
}