First, let the farmers slam shut the canal. Destroy the bridge. Destroy all cans with a knight, and defeat the other soldiers with your knights. Destroy the middle gate with your maceman, defeat the rest and take the flag.
Codes
You can get a huge amount of stone and wood by following the following steps: -
1> Build a castle with 1 ton stone and 1 ton wood (or as less as possible)
2> When the castle is built, extend the castle design to use 100 tons of stone & 100 tons of wood
3> As soon as you exit the castle design screen, demolish the castle. You now have over 65000 tons of stone and wood!
To defend a castle
Put as many archers and crossbow-men into battle as you can and let the computer decide. If you don't have these men, then defend with knights and pike-men.
To surrender a big castle
Let 1500 archers shoot at the archers in the castle. When they are put to death, press autocalc battle. The castle is yours.