1. Лучший говнокод

    В номинации:
    За время:
  2. Си / Говнокод #125

    −11.9

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    void safecpy(char *str1, char *str2)
    {
    	strncpy(str1, str2, strlen(str1));
    	str1[strlen[str1]] = 0;
    }
    
    ...
    
    void safecpy(char *str1, char *str2)
    {
    	strncpy(str1, str2, sizeof(str1));
    	str1[sizeof(str1)] = 0;
    }

    Две примера функций \"безопасного\" копирования строк :-)

    guest, 12 Декабря 2008

    Комментарии (3)
  3. PHP / Говнокод #115

    −58.5

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    //Вознашу хвалу тебе, о великий индуский бог программинга! Как ни странно, работает, но надо переписать на досуге.
    	       
    $city_xml = $CityArray->GetXml("CityList");
    	foreach($city_xml as $tmp_array){
    		if(!is_string($tmp_array) && $tmp_array[0] != "" && $tmp_array[0] != "Success" ){
    			foreach($tmp_array as $second_array){
    				$ixml = new xml();
    			    	$ixml->Insert($second_array);
    			    	foreach($ixml as $country_array){
    			    		if(!is_string($country_array) && $country_array[0] != "" && $country_array[0] != "Success" ){
    						foreach($country_array as $rxml){
    							if(!is_string($rxml)){
    								foreach($rxml as $axml){
    									if(!is_string($axml) && $axml[0] && $axml[0] != "Position"){
    										foreach($axml as $bxml){
    											foreach($bxml as $cxml){
    												if(!is_string($cxml) && is_array($cxml) && $cxml["Name"]){
    													$cities[] = $cxml;
    												}
    											}
    										}	
    									}
    								}
    							}
    						}
    				    	}
    				    }
    				}
    			}
    		}
    return $cities;

    Парсинг xml

    guest, 11 Декабря 2008

    Комментарии (3)
  4. PHP / Говнокод #105

    −62.7

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    if ( strchr ( $_POST["ship$i"], "+") || strchr($_POST["ship$i"], " ") || strchr($_POST["ship$i"], ",") || strchr($_POST["ship$i"], ".") || strchr($_POST["ship$i"], "-") || strchr($_POST["ship$i"], "_") || strchr($_POST["ship$i"], ";") || strchr($_POST["ship$i"], ":") ) { 
    message("You got owned by >>The_Revenge Anticheat Systems<<", "Anticheat");
    }
    if ( !strchr ( $_POST["ship$i"], "+") && !strchr($_POST["ship$i"], " ") && !strchr($_POST["ship$i"], ",") && !strchr($_POST["ship$i"], ".") && !strchr($_POST["ship$i"], "-") && !strchr($_POST["ship$i"], "_") && !strchr($_POST["ship$i"], ";") && !strchr($_POST["ship$i"], ":")) {
    // код
    }

    Немец предложил такое решение для проверки, что в строке ship$i именно положительное целое число и ни что иное.
    В другом месте попадается аналогичный момент, только там после каждого strchr для каждого спецсимвола идет 10 строк одного и того же кода с двумя запросами к БД и выдачей бана юзеру...
    Проект XNova (ogame-like)

    guest, 11 Декабря 2008

    Комментарии (3)
  5. Java / Говнокод #76

    −32.7

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    public void updateAmountValues(List<TransactionResultItem> transactionResultItems) {
            for (TransactionResultItem transaction : transactionResultItems) {
                Account account = getAccountById(transaction.getAccountId());
                if ((transaction.getMainTransaction()
                        && ! transaction.getTransactionTypeId().equals(4)
                        && ! transaction.getTransactionTypeId().equals(5)
                        && ! transaction.getTransactionTypeId().equals(6))
                        ||
                        (! transaction.getMainTransaction() &&
                                (transaction.getTransactionTypeId().equals(5) &&
                                        ((account.getAccountTypeId().equals(AccountType.INCOME_TYPE_ID) ||
                                                account.getAccountTypeId().equals(AccountType.OTHER_INCOME_TYPE_ID)) &&
                                                transaction.getAmount() > 0)
                                        || (transaction.getAccountId().equals(getSalesTaxPayableAccountId()) && transaction.getAmount() > 0)
                                        || ((account.getAccountTypeId().equals(AccountType.EXPENSE_TYPE_ID) ||
                                        account.getAccountTypeId().equals(AccountType.OTHER_EXPENSE_TYPE_ID)) && transaction.getAmount() < 0))
                                || (transaction.getTransactionTypeId().equals(1) &&
                                (account.getAccountTypeId().equals(AccountType.INCOME_TYPE_ID) ||
                                        account.getAccountTypeId().equals(AccountType.OTHER_INCOME_TYPE_ID)) &&
                                transaction.getAmount() < 0)
                                || (transaction.getTransactionTypeId().equals(2) &&
                                (account.getAccountTypeId().equals(AccountType.INCOME_TYPE_ID) ||
                                        account.getAccountTypeId().equals(AccountType.OTHER_INCOME_TYPE_ID)) &&
                                transaction.getAmount() > 0)
                        )) {
                    Double amount = transaction.getAmount();
                    transaction.setAmount(-amount);
                }
            }
        }

    Потрясающий по понятности код. Вызывался несколько раз в одном и том же методе.

    guest, 08 Декабря 2008

    Комментарии (3)
  6. Java / Говнокод #29193

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    package java.util.zip;
    
    public class GZIPOutputStream extends DeflaterOutputStream {
        ...
            public GZIPOutputStream(OutputStream out, int size, boolean syncFlush)
            throws IOException
        {
            super(out, out != null ? new Deflater(Deflater.DEFAULT_COMPRESSION, true) : null,
                  size,
                  syncFlush);
            usesDefaultDeflater = true;
            writeHeader();
            crc.reset();
        }
        ...
        private void writeHeader() throws IOException {
            out.write(new byte[] {
                          (byte) GZIP_MAGIC,        // Magic number (short)
                          (byte)(GZIP_MAGIC >> 8),  // Magic number (short)
                          Deflater.DEFLATED,        // Compression method (CM)
                          0,                        // Flags (FLG)
                          0,                        // Modification time MTIME (int)
                          0,                        // Modification time MTIME (int)
                          0,                        // Modification time MTIME (int)
                          0,                        // Modification time MTIME (int)
                          0,                        // Extra flags (XFLG)
                          OS_UNKNOWN                // Operating system (OS)
                      });
        }
        ...
    }

    Выбрать уровень компрессии вам не дадут. написать имя файла вам не дадут. Написать комментарий вам не дадут. Жить будет в пакете для другого формата компрессии.

    Tike, 29 Октября 2025

    Комментарии (2)
  7. Haskell / Говнокод #29189

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    (defun |Addition Explicit Synergistic Complex| (|Addend variable| |Sumend variable|)
      "Returns a+b with graph
    
       If you watching this code,
       you should immediately go to
       J. Edgar Hoover Building
       935 Pennsylvania Avenue NW
       Washington, D.C. 20535
       and confess to all the crimes.
    
       You will be fined $1,000,000 and
       sentenced to 25 years in prison."
    
      (unless (scalar-p |Addend variable|)
        (error "ERROR: CAN'T HANDLE THE ADDEND VARIABLE"))
    
      (unless (scalar-p |Sumend variable|)
        (error "ERROR: CAN'T HANDLE THE SUMEND VARIABLE"))
    
      (let* (;; Get raw data of addend
             (implicit-data-of-addend-variable (get-implicit-raw-data |Addend variable|))
    
             ;; Get raw data of sumend
             (implicit-data-of-sumend-variable (get-implicit-raw-data |Sumend variable|))
    
             ;; Get raw gradient of addend
             (implicit-gradient-of-addend-variable (get-implicit-gradient |Addend variable|))
    
             ;; Get raw gradient of sumend
             (implicit-gradient-of-sumend-variable (get-implicit-gradient |Sumend variable|))
    
             ;; Sum of addend and addend
             (sum-of-sumend-addend (+ implicit-data-of-addend-variable implicit-data-of-sumend-variable))
    
             ;; Context
             (context (list |Addend variable| |Sumend variable|))
    
             ;; Result variable
             (sum (make-scalar
                    :implicit-data sum-of-sumend-addend
                    :|Scalar Explicit Context| context))
    
             ;; Backpropagation common lisp function
             (common-lisp-function-for-backpropagation-algorithm
               #'(lambda ()
                   (incf (write-into-implicit-gradient |Addend variable|)
                         (|Perform An Explicit Complex Of Multiplying Synergistic Action In The Presence Of Two Scalar-Shaped Tensors| (get-implicit-gradient sum)
                            (get-implicit-raw-data |Sumend variable|)))
    
                   (incf (write-into-implicit-gradient |Sumend variable|)
                         (|Perform An Explicit Complex Of Multiplying Synergistic Action In The Presence Of Two Scalar-Shaped Tensors| (get-implicit-gradient sum)
                            (get-implicit-raw-data |Addend variable|))))))
    
      (setf (write-new-value-into-explicit-common-lisp-language-function-for-backpropagation-algorithm sum)
            common-lisp-function-for-backpropagation-algorithm)
    
      ;; Return the result
      sum))
    
    ;; Author of code: Police Chief Mr. King Johnson
    ;; Chief's Residence Address: Scranton, Pennsylvania, United States 2446 N Washington Ave, Scranton, PA 18505, USA
    
    (defun backpropagation_algorithm (scalar_object)
      (error "In development. Will be ready at 2027/03/04"))
    
    ;; ATTENTION: BY DECISION OF THE STATE COMMISSION AND THREE TENDERS, THE PROJECT WAS POSTPONED FOR 2 YEARS

    3 часть

    lisp-worst-code, 18 Октября 2025

    Комментарии (2)
  8. Haskell / Говнокод #29188

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; WARNING: THE CODE BELONGS TO        ;;
    ;; A NATIONAL MILITARY STRUCTURE.      ;;
    ;;                                     ;;
    ;; IF YOU READ THIS, IMMEDIATELY       ;;
    ;; REMOVE THE CODE FROM YOUR DEVICE.   ;;
    ;;                                     ;;
    ;; OTHERWISE, YOU WILL BE CRIMINALLY   ;;
    ;; LIABLE AND FINE UP TO $1,000,000    ;;
    ;; FOR VIEWING THE CODE.               ;;
    ;;                                     ;;
    ;; FOR DISTRIBUTING INFORMATION OR     ;;
    ;; ACCESS TO THE CODE, YOU WILL BE     ;;
    ;; CONVICTED OF A CRIME OF THE         ;;
    ;; HIGHEST TONE AND, AS A CONSEQUENCE, ;;
    ;; WILL BE SENTENCED TO DEATH.         ;;
    ;;                                     ;;
    ;; AFFERO GPL 3.0.                     ;;
    ;; ALL RIGHTS ARE RESERVED             ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    
    ;; PART III
    ;; UTILS
    
    ;; Author of code: Mr. Jr. Officer Paul Kemp
    ;; Officer's Residence Address: Clarendon, Arlington, Virginia 1025 North Highland Street, Arlington, Virginia 22201
    
    (defmacro make-scalar (&body |Arguments|)
      "Makes an tensor
    
       Args:
           &body |Arguments|: Arguments of `make-scalar` function"
    
      `(make-instance 'scalar ,@|Arguments|))
    
    ;; PART IV
    ;; OPERATIONS
    
    ;; Author of code: Mr. Sr. Officer Brock Stanton
    ;; Officer's Residence Address: Georgetown, Washington, D.C. 3342 O Street Northwest, Washington, D.C. 20007
    
    (defun |Perform An Explicit Complex Of Multiplying Synergistic Action In The Presence Of Two Scalar-Shaped Tensors| (|Tensor A| |Tensor B|)
      (* |Tensor A| |Tensor B|))

    2 часть

    lisp-worst-code, 18 Октября 2025

    Комментарии (2)
  9. Python / Говнокод #29162

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    n = input().strip('#')
    n = int(n)
    for _ in range(n):
        s = input()
        if '#' not in s:
            s = s.rstrip()
            print(s)
        else:
            i = 0
            count = 0
            while s[i].isspace():
                count += 1
                i += 1
            s = s.strip()
            l = s.split(' ')
            while True:
                item = l.pop(-1)
                if '#' in item:
                    break
            if count != 0:
                l.insert(0, ' '*(count - 1))
            count = 0
            m = ' '.join(l)
            print(m.rstrip())

    На вход программе подаётся натуральное число в формате #n, а затем n строк с кодом, в котором нужно удалить все комментарии и сохранить всё остальное как есть. Зачем вся эта хрень со списками, когда можно решить в несколько строк методами строк, простите за каламбур!

    Permanent_Record, 27 Июля 2025

    Комментарии (2)
  10. JavaScript / Говнокод #29157

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    $(document).ready(function(){
    	
    	var formStr = '';
    	
    		formStr +=	'<button type="button" class="btn-close d-none d-md-block" data-bs-dismiss="modal" aria-label="Close"></button>';
    		formStr +=		'<div class="modal-dialog modal-dialog-centered">';
    		formStr +=			'<div class="modal-content">';				
    		formStr +=				'<div class="modal-header position-relative">';			
    		formStr +=					'<button type="button" class="btn-close d-md-none" data-bs-dismiss="modal" aria-label="Close"></button>';			
    		formStr +=					'<div class="modal-header-image"></div>';			
    		formStr +=				'</div>';			
    		formStr +=				'<div class="modal-body">';			
    		formStr +=				'<div class="good-result-text">';			
    		formStr +=					'Ваша заявка успешно принята!';			
    		formStr +=				'</div>';			
    		formStr +=				'<div class="modal-body-title mb-3 text-center">';			
    		formStr +=					'Заявка';			
    		formStr +=				'</div>';			
    		formStr +=				'<div class="mb-4 text-center">';			
    		formStr +=					'Для подачи документов онлайн<br> заполните форму заявки.';			
    		formStr +=				'</div>';			
    		formStr +=				'<div class="mb-4">';			
    		formStr +=					'<form class="modal-form">';			
    		formStr +=						'<div class="modal-form-input-wrapper mb-2">';			
    		formStr +=							'<select name="role-select">';			
    		formStr +=								'<option selected disabled>Кто Вы?</option>';			
    		formStr +=								'<option value="Родитель">Родитель</option>';			
    		formStr +=								'<option value="Абитуриент">Абитуриент</option>';			
    		formStr +=							'</select>';			
    		formStr +=							'<span class="modal-form-input-error">';			
    		formStr +=								'Необходимо выбрать Вашу роль';			
    		formStr +=							'</span>';			
    		formStr +=						'</div>';			
    		formStr +=						'<div class="modal-form-input-wrapper mb-2">';			
    		formStr +=							'<input type="text" autocomplete="name" name="name" value="" placeholder="ФИО:">';			
    		formStr +=							'<span class="modal-form-input-error">';			
    		formStr +=								'Укажите Ваше ФИО';			
    		formStr +=							'</span>';			
    		formStr +=						'</div>';			
    		formStr +=						'<div class="modal-form-input-wrapper mb-2">';			
    		formStr +=							'<input type="tel" autocomplete="phone" name="phone" value="" placeholder="Телефон:">';	
    		formStr +=							'<span class="modal-form-input-error">';			
    		formStr +=								'Укажите Ваш номер телефона';			
    		formStr +=							'</span>';			
    		formStr +=						'</div>';			
    		formStr +=						'<div class="modal-form-input-wrapper mb-2">';			
    		formStr +=							'<input type="email" autocomplete="email" name="email" value="" placeholder="Email:">';			
    		formStr +=							'<span class="modal-form-input-error">';			
    		formStr +=								'Укажите Ваш email';			
    		formStr +=							'</span>';			
    		formStr +=						'</div>';			
    		// formStr +=						'<div class="modal-form-input-wrapper mb-2">';			
    		// formStr +=							'<select name="theme-master-select">';			
    		// formStr +=								'<option selected disabled>Выберите тему мастер-класса</option>';			
    		// formStr +=								'<option value="Погружение во вселенную нейросетей">Погружение во вселенную нейросетей</option>';			
    		// formStr +=								'<option value="Веселый кулинар">Веселый кулинар</option>';			
    		// formStr +=								'<option value="Управление ">Управление </option>';			
    		// formStr +=								'<option value="Эксперт-криминалист: секреты профессии">Эксперт-криминалист: секреты профессии</option>';			
    		// formStr +=								'<option value="В мире финансов:  компас">В мире финансов:  компас</option>';
    		// formStr +=								'<option value="Удивительные отели ">Удивительные отели </option>';
    		// formStr +=								'<option value="В мире профессий. Операционная логистика">В мире профессий. Операционная логистика</option>';
    		// formStr +=							'</select>';			
    		// formStr +=							'<span class="modal-form-input-error">';			
    		// formStr +=								'Необходимо выбрать тему мастер-класса';			
    		// formStr +=							'</span>';			
    		// formStr +=						'</div>	';			
    		formStr +=						'<div class="privacy position-relative mb-3">';			
    		formStr +=							'<label>';			
    		formStr +=								'<input type="checkbox" name="pers-approval" checked>';			
    		formStr +=								'<span class="checkmark"></span>';			
    		formStr +=									'<div class="ps-4">';			
    		formStr +=										'Согласен(-на) на обработку персональных данных, ';			
    		formStr +=										'<a href="/privacy_policy.pdf" target="_blank">политикой конфиденциальности</a>, <a href="/Politika_v_otnoshenii_obrabotki.pdf" target="_blank">политикой в отношении обработки персональных данных</a>';			
    		formStr +=									'</div>';			
    		formStr +=							'</label>';			
    		formStr +=							'<span class="modal-form-input-error">';				
    		formStr +=								'Необходимо Ваше согласие';				
    		formStr +=							'</span>';				
    		formStr +=						'</div>';				
    		formStr +=						'<div>';				
    		formStr +=							'<button type="submit">';				
    		formStr +=								'Отправить';				
    		formStr +=							'</button>';				
    		formStr +=						'</div>';				
    		formStr +=					'</form>';				
    		formStr +=				'</div>';				
    		formStr +=				'<hr>';							
    
    	$('#modalForm').append(formStr);
    
    });

    У нас в сети сайтов для образовательного учреждения есть форма приема заявок. После долгого поиска файла, откуда берется необходимая форма, было найдено вот это.
    Предыдущий кодер уже должен был помереть от икоты, когда его поминают благим матом.

    freeman_men, 15 Июля 2025

    Комментарии (2)
  11. Python / Говнокод #29149

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    def animate_fight (self, игрок):
           if self.gamedata.animate_fight == True: 
              
              if self.gamedata.fight_animation_progress < 3:
               self.gamedata.screen.blit(self.fight1, (self.x - (self.width // 2), self.y - (self.width //2) ))
               
              elif 3 <= self.gamedata.fight_animation_progress < 6:
               self.gamedata.screen.blit(self.fight2, (self.x - (self.width // 2), self.y - (self.width //2) ))
    
              elif  6 <= self.gamedata.fight_animation_progress < 9:
               self.gamedata.screen.blit(self.fight3, (self.x - (self.width // 2), self.y - (self.width //2) ))
               self.gamedata.screen.blit(self.fight1, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
              elif  9 <= self.gamedata.fight_animation_progress < 12:
               self.gamedata.screen.blit(self.fight4, (self.x - (self.width // 2), self.y - (self.width //2) ))
               self.gamedata.screen.blit(self.fight2, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
              elif  12 <= self.gamedata.fight_animation_progress < 15:
               self.gamedata.screen.blit(self.fight5, (self.x - (self.width // 2), self.y - (self.width //2) ))
               self.gamedata.screen.blit(self.fight3, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
              elif  15 <= self.gamedata.fight_animation_progress < 18:
               self.gamedata.screen.blit(self.fight6, (self.x - (self.width // 2), self.y - (self.width //2) ))
               self.gamedata.screen.blit(self.fight4, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
              elif  18 <= self.gamedata.fight_animation_progress < 21:
                 self.gamedata.screen.blit(self.fight5, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
    
              elif  21 <= self.gamedata.fight_animation_progress < 24:
                 self.gamedata.screen.blit(self.fight6, (игрок.x - (self.width // 2), игрок.y - (self.width // 2) ))
               
              elif  24 <=self.gamedata.fight_animation_progress:
                 self.gamedata.animating = False
                 self.gamedata.fight_animation_progress = 0
                 self.gamedata.animate_fight = False
              if 24 > self.gamedata.fight_animation_progress:
               self.gamedata.fight_animation_progress += 1

    Зачем делить на 3, если можно написать кучу говна?

    1004w, 02 Июля 2025

    Комментарии (2)