You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- It is recommended to have **test files** for [unit testing](https://go.dev/doc/tutorial/add-a-test).
37
37
38
38
- Some **banner** files with a specific graphical template representation using ASCII will be given. The files are formatted in a way that is not necessary to change them.
39
-
40
39
-[shadow](shadow.txt)
41
40
-[standard](standard.txt)
42
41
-[thinkertoy](thinkertoy.txt)
@@ -113,32 +112,32 @@ student$ go run . "HeLlO" | cat -e
Copy file name to clipboardExpand all lines: subjects/blockchain/retrieve-transaction-in-out/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ _+ 0.01 fee_
15
15
16
16
### Instructions
17
17
18
-
Using a local Bitcoin node RPC API, create a function `retrieveTxValue()` that takes as input a hash of a simple transaction, and returns an object with an array of inputs values and an array outputs values in this transaction.
18
+
Using a local Bitcoin node RPC API, create a function `retrieveTransactionInOut()` that takes as input a hash of a simple transaction, and returns an object with an array of inputs values and an array outputs values in this transaction.
19
19
20
20
The Bitcoin node RPC interface is expected to be running with the following parameters:
Copy file name to clipboardExpand all lines: subjects/java/raids/jraffic/README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,24 @@ East --------------- --------------- West
47
47
48
48
Position traffic lights at the points where each lane enters the intersection. Your traffic lights should only have two colors: red and green.
49
49
50
-
You can use any algorithm to control the traffic lights. However, the system should be efficient enough to avoid traffic congestion (8 or more vehicles). The primary aim of the traffic light system is to prevent collisions at the intersection.
50
+
You can implement any algorithm you choose to control the traffic lights system, but bear in mind that **traffic congestion should remain below the lane’s maximum capacity**.
51
+
52
+
> **Dynamic Congestion Rule:**
53
+
> The maximum allowed queue length for each lane is calculated based on the lane’s physical length, vehicle length, and safety gap between vehicles:
> - `lane_length`: Distance from the stop line to the vehicle spawn point
62
+
> - `vehicle_length`: Approximate car length in simulation units (e.g., pixels or meters)
63
+
> - `safety_gap`: Minimum safe distance between vehicles
64
+
>
65
+
> If the number of vehicles in a lane reaches this capacity, the traffic light logic should adjust (e.g., extend green time for that lane) to prevent overflow.
66
+
67
+
The primary function of your traffic light system is to avoid collisions between vehicles passing through the intersection, while dynamically adapting to congestion.
51
68
52
69
**3. Vehicles**
53
70
@@ -56,6 +73,7 @@ You can use any algorithm to control the traffic lights. However, the system sho
56
73
/|_||_\`.__
57
74
=`-(_)--(_)-'
58
75
```
76
+
59
77
The vehicles traveling through your capital city's new junction must follow these rules:
60
78
61
79
- Vehicles must be painted in a color that illustrates the route they will follow. The colors are up to you to decide, and your choices will need to be made available during the audit of the raid. For example, all cars which make a right turn could be painted yellow. It's really up to you though.
@@ -87,21 +105,21 @@ You will use your keyboard to spawn vehicles for your simulation. You will use t
87
105
88
106
> A safe distance is any distance which enables the vehicles to avoid crashing into each other.
89
107
90
-
91
108
### Example
92
109
93
110
You can see an example for road_intersection [here](https://www.youtube.com/watch?v=6B0-ZBET6mo).
94
111
95
112
### Bonus
113
+
96
114
You can implement the following optional features:
97
115
98
116
- Vehicle and traffic light animations, and image rendering. You can find some cool assets here:
Copy file name to clipboardExpand all lines: subjects/java/raids/jraffic/audit/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
-
#### Comprehension
1
+
#### Comprehension
2
+
3
+
**_Is the student able to justify his choices and explain the following:_**
4
+
**_Note:_** Ask the student to show you the implementation in the source code when necessary.
2
5
3
-
***Is the student able to justify his choices and explain the following:***
4
-
***Note:*** Ask the student to show you the implementation in the source code when necessary.
5
6
###### Can the student explain why he uses this library?
6
7
7
8
###### Can the student explain how he manages the High-Traffic congestion
@@ -12,7 +13,7 @@
12
13
13
14
###### Can the student explain how he manages the key hooks?
14
15
15
-
#### Functional
16
+
#### Functional
16
17
17
18
##### Try to run the application.
18
19
@@ -94,7 +95,7 @@
94
95
95
96
###### Was the simulation ended?
96
97
97
-
###### High traffic congestion is when there are 8 or more vehicles in the same lane without proceeding. Was there low traffic congestion while running the simulation?
98
+
###### High traffic congestion is when there are **Max Capacity** in the same lane without proceeding. Was there low traffic congestion while running the simulation?
Copy file name to clipboardExpand all lines: subjects/make-your-game/score-handling/audit/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#### Functional
2
2
3
-
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
3
+
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/) and [Gorilla](https://pkg.go.dev/github.com/gorilla/websocket))
0 commit comments