eurodiffusion's People
eurodiffusion's Issues
Використання іменованих констант
Використання іменованих констант: Замість безпосереднього використання числових значень, створіть іменовані константи для числових значень, щоб код був більш зрозумілим. Наприклад, ви можете визначити константу DEFAULT_BALANCE_AMOUNT = 1_000_000 замість безпосереднього використання числа 1_000_000 в коді.
EuroDiffusion/Lab1/src/main/kotlin/Main.kt
Lines 28 to 30 in 1c11e4b
EuroDiffusion/Lab1/src/main/kotlin/Main.kt
Lines 158 to 162 in 1c11e4b
Consts
Make some consts for magic numbers
Remove local
Just:
neighbor.taxOffice[c]!!.amount += expanses
?
Спрощення сортування
Використовуйте функцію sortedBy замість sortedWith(Comparator) для спрощення сортування. Наприклад, замість countries.sortedWith(Comparator { o1: Country, o2: Country -> ... }) можна використовувати countries.sortedBy { it.completeDay to it.name }:
EuroDiffusion/Lab1/src/main/kotlin/Main.kt
Lines 99 to 100 in 1c11e4b
Coordinates
What if the coordinates wiil be out of [1..10]?
General
Make program not hanging with 'islands' situation
Стандартні функції Kotlin
Використовуйте стандартні функції Kotlin, такі як all та any, для заміни власних циклів та умовних перевірок. Наприклад, замість циклу for та умовного оператора if у функції complete, можна використовувати all для перевірки, чи всі міста країни є завершеними:
EuroDiffusion/Lab1/src/main/kotlin/Main.kt
Lines 66 to 84 in 1c11e4b
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.